@@ -28,15 +28,27 @@ def feature_repo(feastignore_contents: Optional[str]): |
28 | 28 | (repo_root / "bar").mkdir() |
29 | 29 | (repo_root / "bar/subdir1").mkdir() |
30 | 30 | (repo_root / "bar/subdir1/subdir2").mkdir() |
| 31 | + (repo_root / "foo/__pycache__").mkdir() |
| 32 | + (repo_root / "foo/.pytest_cache").mkdir() |
| 33 | + (repo_root / "foo/.ipynb_checkpoints").mkdir() |
| 34 | + (repo_root / "bar/subdir1/.ipynb_checkpoints").mkdir() |
| 35 | + (repo_root / "bar/subdir1/subdir2/.ipynb_checkpoints").mkdir() |
31 | 36 |
|
32 | 37 | (repo_root / "a.py").touch() |
33 | 38 | (repo_root / ".ipynb_checkpoints/test-checkpoint.py").touch() |
34 | 39 | (repo_root / "foo/b.py").touch() |
| 40 | + (repo_root / "foo/__pycache__/b.cpython.pyc").touch() |
| 41 | + (repo_root / "foo/.pytest_cache/test-README.md").touch() |
| 42 | + (repo_root / "foo/.ipynb_checkpoints/foo-checkpoint.py").touch() |
35 | 43 | (repo_root / "foo1/c.py").touch() |
36 | 44 | (repo_root / "foo1/bar/d.py").touch() |
37 | 45 | (repo_root / "bar/e.py").touch() |
38 | 46 | (repo_root / "bar/subdir1/f.py").touch() |
| 47 | + (repo_root / "bar/subdir1/.ipynb_checkpoints/subdir1-checkpoint.py").touch() |
39 | 48 | (repo_root / "bar/subdir1/subdir2/g.py").touch() |
| 49 | + ( |
| 50 | + repo_root / "bar/subdir1/subdir2/.ipynb_checkpoints/nested-checkpoint.py" |
| 51 | + ).touch() |
40 | 52 |
|
41 | 53 | if feastignore_contents: |
42 | 54 | with open(repo_root / ".feastignore", "w") as f: |
@@ -80,6 +92,7 @@ def test_feastignore_no_stars(): |
80 | 92 | { |
81 | 93 | (repo_root / "foo/b.py").resolve(), |
82 | 94 | (repo_root / "bar/subdir1/f.py").resolve(), |
| 95 | + (repo_root / "foo/.ipynb_checkpoints/foo-checkpoint.py").resolve(), |
83 | 96 | } |
84 | 97 | ) |
85 | 98 | assertpy.assert_that(get_repo_files(repo_root)).is_equal_to( |
@@ -110,6 +123,13 @@ def test_feastignore_with_stars(): |
110 | 123 | { |
111 | 124 | (repo_root / "foo/b.py").resolve(), |
112 | 125 | (repo_root / "bar/subdir1/f.py").resolve(), |
| 126 | + ( |
| 127 | + repo_root |
| 128 | + / "bar/subdir1/subdir2/.ipynb_checkpoints/nested-checkpoint.py" |
| 129 | + ).resolve(), |
| 130 | + ( |
| 131 | + repo_root / "bar/subdir1/.ipynb_checkpoints/subdir1-checkpoint.py" |
| 132 | + ).resolve(), |
113 | 133 | (repo_root / "bar/e.py").resolve(), |
114 | 134 | (repo_root / "bar/subdir1/f.py").resolve(), |
115 | 135 | (repo_root / "bar/subdir1/subdir2/g.py").resolve(), |
@@ -135,6 +155,13 @@ def test_feastignore_with_stars2(): |
135 | 155 | assertpy.assert_that(get_ignore_files(repo_root, ignore_paths)).is_equal_to( |
136 | 156 | { |
137 | 157 | (repo_root / "bar/subdir1/f.py").resolve(), |
| 158 | + ( |
| 159 | + repo_root |
| 160 | + / "bar/subdir1/subdir2/.ipynb_checkpoints/nested-checkpoint.py" |
| 161 | + ).resolve(), |
| 162 | + ( |
| 163 | + repo_root / "bar/subdir1/.ipynb_checkpoints/subdir1-checkpoint.py" |
| 164 | + ).resolve(), |
138 | 165 | (repo_root / "bar/e.py").resolve(), |
139 | 166 | (repo_root / "bar/subdir1/f.py").resolve(), |
140 | 167 | (repo_root / "bar/subdir1/subdir2/g.py").resolve(), |
|