Skip to content

Commit 0e20bde

Browse files
committed
Trying to understand what's up with the tests
1 parent fa53fd4 commit 0e20bde

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

tests/test_rules/test_on_abcvoting_instances.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,17 @@ def process_yaml_file(yaml_file_path: str):
160160

161161
class TestOnABCVoting(TestCase):
162162
def test_rules_on_abcvoting(self):
163-
return
164163
current_file_path = os.path.dirname(os.path.realpath(__file__))
165164
yaml_dir_path = os.path.join(current_file_path, "abcvoting_test_instances")
166165
all_yaml_files = os.listdir(yaml_dir_path)
167166
yaml_paths = [os.path.join(yaml_dir_path, f) for f in all_yaml_files]
168167

169-
with Pool(processes=None) as pool:
170-
for res in pool.imap_unordered(process_yaml_file, yaml_paths):
168+
if __name__ == "__main__":
169+
with Pool(processes=None) as pool:
170+
for res in pool.imap_unordered(process_yaml_file, yaml_paths):
171+
self.assertTrue(res)
172+
else:
173+
# fallback for CI environments
174+
for path in yaml_paths:
175+
res = process_yaml_file(path)
171176
self.assertTrue(res)

0 commit comments

Comments
 (0)