Skip to content

Commit

Permalink
Use lru_cache clear fixture at test module level
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Mar 11, 2024
1 parent a13af46 commit 0c20863
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/darker/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def randomword(length: int) -> str:
letters = string.ascii_lowercase
return "".join(random.choice(letters) for _i in range(length)) # nosec

pytestmark = pytest.mark.usefixtures("find_project_root_cache_clear")

Check failure on line 40 in src/darker/tests/test_main.py

View workflow job for this annotation

GitHub Actions / flake8

expected 2 blank lines after class or function definition, found 1


def _replace_diff_timestamps(text, replacement="<timestamp>"):
return re.sub(r"\d{4}-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d\d\d\d", replacement, text)
Expand Down

0 comments on commit 0c20863

Please sign in to comment.