summaryrefslogtreecommitdiff
path: root/tests/user_commands
diff options
context:
space:
mode:
Diffstat (limited to 'tests/user_commands')
-rw-r--r--tests/user_commands/tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
index acc338685e..4b03f54564 100644
--- a/tests/user_commands/tests.py
+++ b/tests/user_commands/tests.py
@@ -565,11 +565,15 @@ class UtilsTests(SimpleTestCase):
self.assertEqual(normalize_path_patterns(["foo/bar/*", "bar/*/"]), expected)
def test_run_formatters_handles_oserror_for_black_path(self):
+ test_files_path = Path(__file__).parent / "test_files"
cases = [
- (FileNotFoundError, "nonexistent"),
+ (
+ FileNotFoundError,
+ str(test_files_path / "nonexistent"),
+ ),
(
OSError if sys.platform == "win32" else PermissionError,
- str(Path(__file__).parent / "test_files" / "black"),
+ str(test_files_path / "black"),
),
]
for exception, location in cases: