|
25 | 25 | from matchcode.utils import index_packages_sha1 |
26 | 26 | from matchcode.utils import load_resources_from_scan |
27 | 27 | from matchcode.utils import MatchcodeTestCase |
| 28 | +from matchcode.tests import FIXTURES_REGEN |
28 | 29 |
|
29 | 30 |
|
30 | 31 | def run_do_match_from_scan(scan_file_location, match_type): |
@@ -108,25 +109,25 @@ def test_do_match_package_archive_match(self): |
108 | 109 | input_file = self.get_test_loc('models/match-test.json') |
109 | 110 | vc = run_do_match_from_scan(input_file, EXACT_PACKAGE_ARCHIVE_MATCH) |
110 | 111 | expected = self.get_test_loc('models/match-test-exact-package-results.json') |
111 | | - self.check_codebase(vc, expected, regen=False) |
| 112 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
112 | 113 |
|
113 | 114 | def test_do_match_approximate_directory_structure_match(self): |
114 | 115 | input_file = self.get_test_loc('models/match-test.json') |
115 | 116 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
116 | 117 | expected = self.get_test_loc('models/match-test-approximate-directory-structure-results.json') |
117 | | - self.check_codebase(vc, expected, regen=False) |
| 118 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
118 | 119 |
|
119 | 120 | def test_do_match_approximate_directory_content_match(self): |
120 | 121 | input_file = self.get_test_loc('models/match-test.json') |
121 | 122 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_CONTENT_MATCH) |
122 | 123 | expected = self.get_test_loc('models/match-test-approximate-directory-content-results.json') |
123 | | - self.check_codebase(vc, expected, regen=False) |
| 124 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
124 | 125 |
|
125 | 126 | def test_do_match_package_file_match(self): |
126 | 127 | input_file = self.get_test_loc('models/match-test.json') |
127 | 128 | vc = run_do_match_from_scan(input_file, EXACT_FILE_MATCH) |
128 | 129 | expected = self.get_test_loc('models/match-test-exact-file-results.json') |
129 | | - self.check_codebase(vc, expected, regen=False) |
| 130 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
130 | 131 |
|
131 | 132 |
|
132 | 133 | class MatchNestedPackagesTestCase(MatchcodeTestCase): |
@@ -166,7 +167,7 @@ def test_do_match_approximate_directory_structure_match(self): |
166 | 167 | input_file = self.get_test_loc('match/nested/nested.json') |
167 | 168 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
168 | 169 | expected = self.get_test_loc('match/nested/nested-expected.json') |
169 | | - self.check_codebase(vc, expected, regen=False) |
| 170 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
170 | 171 |
|
171 | 172 |
|
172 | 173 | class MatchUtilityFunctionsTestCase(MatchcodeTestCase): |
@@ -275,52 +276,52 @@ def test_match_ApproximateDirectoryStructureIndex_abbrev_1_0_3(self): |
275 | 276 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.0.3-i.json') |
276 | 277 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
277 | 278 | expected = self.get_test_loc('match/directory-matching/abbrev-1.0.3-i-expected.json') |
278 | | - self.check_codebase(vc, expected, regen=False) |
| 279 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
279 | 280 |
|
280 | 281 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_0_4(self): |
281 | 282 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.0.4-i.json') |
282 | 283 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
283 | 284 | expected = self.get_test_loc('match/directory-matching/abbrev-1.0.4-i-expected.json') |
284 | | - self.check_codebase(vc, expected, regen=False) |
| 285 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
285 | 286 |
|
286 | 287 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_0_5(self): |
287 | 288 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.0.5-i.json') |
288 | 289 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
289 | 290 | expected = self.get_test_loc('match/directory-matching/abbrev-1.0.5-i-expected.json') |
290 | | - self.check_codebase(vc, expected, regen=False) |
| 291 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
291 | 292 |
|
292 | 293 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_0_6(self): |
293 | 294 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.0.6-i.json') |
294 | 295 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
295 | 296 | expected = self.get_test_loc('match/directory-matching/abbrev-1.0.6-i-expected.json') |
296 | | - self.check_codebase(vc, expected, regen=False) |
| 297 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
297 | 298 |
|
298 | 299 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_0_7(self): |
299 | 300 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.0.7-i.json') |
300 | 301 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
301 | 302 | expected = self.get_test_loc('match/directory-matching/abbrev-1.0.7-i-expected.json') |
302 | | - self.check_codebase(vc, expected, regen=False) |
| 303 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
303 | 304 |
|
304 | 305 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_0_9(self): |
305 | 306 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.0.9-i.json') |
306 | 307 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
307 | 308 | expected = self.get_test_loc('match/directory-matching/abbrev-1.0.9-i-expected.json') |
308 | | - self.check_codebase(vc, expected, regen=False) |
| 309 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
309 | 310 |
|
310 | 311 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_1_0(self): |
311 | 312 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.1.0-i.json') |
312 | 313 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
313 | 314 | expected = self.get_test_loc('match/directory-matching/abbrev-1.1.0-i-expected.json') |
314 | | - self.check_codebase(vc, expected, regen=False) |
| 315 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
315 | 316 |
|
316 | 317 | def test_match_ApproximateDirectoryStructureIndex_abbrev_1_1_1(self): |
317 | 318 | input_file = self.get_test_loc('match/directory-matching/abbrev-1.1.1-i.json') |
318 | 319 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
319 | 320 | expected = self.get_test_loc('match/directory-matching/abbrev-1.1.1-i-expected.json') |
320 | | - self.check_codebase(vc, expected, regen=False) |
| 321 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
321 | 322 |
|
322 | 323 | def test_match_ApproximateDirectoryStructureIndex_get_stdin_3_0_2(self): |
323 | 324 | input_file = self.get_test_loc('match/directory-matching/get-stdin-3.0.2-i.json') |
324 | 325 | vc = run_do_match_from_scan(input_file, APPROXIMATE_DIRECTORY_STRUCTURE_MATCH) |
325 | 326 | expected = self.get_test_loc('match/directory-matching/get-stdin-3.0.2-i-expected.json') |
326 | | - self.check_codebase(vc, expected, regen=False) |
| 327 | + self.check_codebase(vc, expected, regen=FIXTURES_REGEN) |
0 commit comments