File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 2020
2121n_test_files_per_yml = int (os .environ .get ('N_TESTS_PER_YAML' , 4 ))
2222
23+ # Blacklisted tests will be skipped
2324BLACKLIST = {'test_reduction' }
2425
26+ # Long-running tests will not be bundled with other tests
27+ LONGLIST = {'test_hgq_layers' }
28+
2529
2630def path_to_name (test_path ):
2731 path = Path (test_path )
@@ -43,9 +47,7 @@ def uses_example_model(test_filename):
4347
4448def generate_test_yaml (test_root = '.' ):
4549 test_root = Path (test_root )
46- test_paths = [path for path in test_root .glob ('**/test_*.py' ) if path .stem not in BLACKLIST ]
47- for path in test_paths :
48- print (path .name )
50+ test_paths = [path for path in test_root .glob ('**/test_*.py' ) if path .stem not in (BLACKLIST | LONGLIST )]
4951 need_example_models = [uses_example_model (path ) for path in test_paths ]
5052
5153 idxs = list (range (len (need_example_models )))
@@ -63,6 +65,15 @@ def generate_test_yaml(test_root='.'):
6365 yml = diff_yml
6466 else :
6567 yml .update (diff_yml )
68+
69+ test_paths = [path for path in test_root .glob ('**/test_*.py' ) if path .stem in LONGLIST ]
70+ for path in test_paths :
71+ name = path .stem .replace ('test_' , '' )
72+ test_file = str (path .relative_to (test_root ))
73+ needs_examples = uses_example_model (path )
74+ diff_yml = yaml .safe_load (template .format (name , test_file , needs_examples ))
75+ yml .update (diff_yml )
76+
6677 return yml
6778
6879
You can’t perform that action at this time.
0 commit comments