Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 15, 2024
1 parent e371879 commit 81580c8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions testing/test_assertrewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,11 @@ def __{name}__(self,other):
())
""")



preserved(f"""
preserved("""
def func(value):
loc("func")
return value
class T:
def __iter__(self):
loc("iter")
Expand All @@ -330,7 +328,7 @@ def __iter__(self):
assert func(*T()) == 5
""")

preserved(f"""
preserved("""
class T:
def __getattr__(self,name):
loc()
Expand All @@ -339,7 +337,6 @@ def __getattr__(self,name):
assert T().attr == "attr"
""")


def test_dont_rewrite(self) -> None:
s = """'PYTEST_DONT_REWRITE'\nassert 14"""
m = rewrite(s)
Expand Down

0 comments on commit 81580c8

Please sign in to comment.