We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79a1d91 commit 3daf8a7Copy full SHA for 3daf8a7
tests/test_black.py
@@ -1455,6 +1455,18 @@ def test_normalize_path_ignore_windows_junctions_outside_of_root(self) -> None:
1455
1456
self.assertEqual(normalized_path, None)
1457
1458
+ def test_normalize_path_outside_of_root(self) -> None:
1459
+
1460
+ with TemporaryDirectory() as workspace:
1461
+ root = Path(workspace)
1462
+ target_path = root / ".."
1463
+ report = black.Report(verbose=True)
1464
+ normalized_path = black.normalize_path_maybe_ignore(
1465
+ target_path, root, report
1466
+ )
1467
1468
+ self.assertNotEqual(normalized_path, None)
1469
1470
def test_newline_comment_interaction(self) -> None:
1471
source = "class A:\\\r\n# type: ignore\n pass\n"
1472
output = black.format_str(source, mode=DEFAULT_MODE)
0 commit comments