|
11 | 11 | import hashlib
|
12 | 12 | import json
|
13 | 13 | import os
|
14 |
| -import sys |
15 | 14 | from functools import wraps
|
16 | 15 | from unittest.mock import patch
|
17 | 16 |
|
|
38 | 37 | assert NAMES, "No yaml files found in " + HERE
|
39 | 38 |
|
40 | 39 |
|
41 |
| -def is_ubuntu(): |
42 |
| - if os.path.isfile("/etc/os-release"): |
43 |
| - with open("/etc/os-release") as f: |
44 |
| - return "Ubuntu" in f.read() |
45 |
| - return False |
46 |
| - |
47 |
| - |
48 |
| -def is_darwin(): |
49 |
| - if os.path.isfile("/etc/os-release"): |
50 |
| - with open("/etc/os-release") as f: |
51 |
| - return "Darwin" in f.read() |
52 |
| - return False |
53 |
| - |
54 |
| - |
55 |
| -# run extensive tests only on Ubuntu and Darwin, and not on Python 3.9 and 3.11 |
56 |
| -extensive_tests = (sys.version_info[:2] not in [(3, 9), (3, 11)]) and (is_ubuntu() or is_darwin()) |
57 |
| - |
58 |
| - |
59 | 40 | def mockup_from_source(func):
|
60 | 41 | @wraps(func)
|
61 | 42 | def wrapper(*args, **kwargs):
|
@@ -251,8 +232,10 @@ def compare(self):
|
251 | 232 | # do not compare tendencies statistics yet, as we don't know yet if they should stay
|
252 | 233 |
|
253 | 234 |
|
| 235 | +# it would be nice to use a @pytest.mark.slow and configure this globally |
| 236 | +# this could be done when refactoring the tests, and setting up canary/nightly builds |
| 237 | +@pytest.mark.skipif(not os.environ.get("SLOW_TESTS"), reason="No SLOW_TESTS env var") |
254 | 238 | @pytest.mark.parametrize("name", NAMES)
|
255 |
| -@pytest.mark.skipif(not extensive_tests, reason="Skipping to run the test faster") |
256 | 239 | @mockup_from_source
|
257 | 240 | def test_run(name):
|
258 | 241 | config = os.path.join(HERE, name + ".yaml")
|
|
0 commit comments