Skip to content

Commit

Permalink
Update tests - conver no parent .gitignore case.
Browse files Browse the repository at this point in the history
  • Loading branch information
hadialqattan committed May 15, 2021
1 parent 004cdd8 commit 7d42596
Show file tree
Hide file tree
Showing 60 changed files with 10 additions and 10 deletions.
Binary file added .coverage.LAPTOP-K50SM9F6.1266.194096
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1267.413730
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1268.988152
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1269.179618
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1270.838264
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1271.867560
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1272.618260
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1275.523939
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1276.487099
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1277.557032
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1278.005635
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1281.743123
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1283.065579
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1285.228318
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1286.684165
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1287.328072
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1288.870513
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1289.695979
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1290.562655
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1291.211433
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1292.638844
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1293.232301
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1294.333797
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1295.186390
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1423.708192
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1424.091769
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1425.200163
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1426.885221
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1427.359229
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1429.323999
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1430.637775
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1431.308797
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1432.907767
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1433.107895
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1434.391778
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1435.118452
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1440.923217
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1441.033810
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1442.447792
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1443.416247
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1444.489506
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1445.499453
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1448.230111
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1449.189378
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1450.530450
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1451.296391
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1452.097677
Binary file not shown.
Binary file added .coverage.LAPTOP-K50SM9F6.1453.158513
Binary file not shown.
1 change: 0 additions & 1 deletion tests/data/gitignore_levels_tests/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion tests/data/gitignore_levels_tests/child_dir/.gitignore

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/data/gitignore_levels_tests/ignored_in_root.py

This file was deleted.

3 changes: 3 additions & 0 deletions tests/data/nested_gitignore_tests/pyproject.toml
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=41.0", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"
1 change: 1 addition & 0 deletions tests/data/nested_gitignore_tests/root/.gitignore
@@ -0,0 +1 @@
a.py
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/data/nested_gitignore_tests/root/child/.gitignore
@@ -0,0 +1 @@
b.py
10 changes: 5 additions & 5 deletions tests/test_black.py
Expand Up @@ -1703,16 +1703,16 @@ def test_gitignore_exclude(self) -> None:
)
self.assertEqual(sorted(expected), sorted(sources))

def test_respect_gitignore_levels(self) -> None:
path = Path(THIS_DIR / "data" / "gitignore_levels_tests")
def test_nested_gitignore(self) -> None:
path = Path(THIS_DIR / "data" / "nested_gitignore_tests")
include = re.compile(r"\.pyi?$")
exclude = re.compile(r"")
root_gitignore = black.files.get_gitignore(path)
report = black.Report()
expected: List[Path] = [
Path(path / "included.py"),
Path(path / "ignored_in_child.py"),
Path(path / "child_dir/included.py"),
Path(path / "root/b.py"),
Path(path / "root/c.py"),
Path(path / "root/child/c.py"),
]
this_abs = THIS_DIR.resolve()
sources = list(
Expand Down

0 comments on commit 7d42596

Please sign in to comment.