Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test decorator fixer leaves indentation #508

Open
adamchainz opened this issue Oct 29, 2024 · 0 comments · May be fixed by #518
Open

Test decorator fixer leaves indentation #508

adamchainz opened this issue Oct 29, 2024 · 0 comments · May be fixed by #518

Comments

@adamchainz
Copy link
Owner

Python Version

3.12

Django Version

4.2

Package Version

1.21.0

Description

Happened on django-linear-migrations:

diff --git tests/test_makemigrations.py tests/test_makemigrations.py
index c26e9cb..ddf0178 100644
--- tests/test_makemigrations.py
+++ tests/test_makemigrations.py
@@ -34,8 +34,7 @@ def test_creates_max_migration_txt(self):
         max_migration_txt = self.migrations_dir / "max_migration.txt"
         assert max_migration_txt.read_text() == "0001_initial\n"
 
-    @unittest.skipUnless(django.VERSION >= (4, 2), "--update added in Django 4.2")
-    def test_update(self):
+        def test_update(self):
         self.call_command("testapp")
         max_migration_txt = self.migrations_dir / "max_migration.txt"
         assert max_migration_txt.read_text() == "0001_initial\n"

I think we need to ensure we remove all tokens from the decorator line.

@adamchainz adamchainz changed the title Test decorator fixer accidentally left indentation Test decorator fixer accidentally leaves indentation Oct 29, 2024
@adamchainz adamchainz changed the title Test decorator fixer accidentally leaves indentation Test decorator fixer leaves indentation Oct 29, 2024
@UnknownPlatypus UnknownPlatypus linked a pull request Dec 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant