Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit d22616f

Browse files
committed
Fix the configs pytest
This test was marked as a fixture. This didn't make much sense to me. Now this test is run as any other test and works, as seen with the rustc-guide json file, where it detected that this file was broken.
1 parent ab9ad47 commit d22616f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

highfive/configs/rust-lang/rustc-guide.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"all": ["@nikomatsakis", "@mark-i-m"]
44
},
55
"dirs": {
6-
},
6+
}
77
}

highfive/tests/test_configs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def config_valid(fname):
104104

105105
@pytest.mark.config
106106
@pytest.mark.hermetic
107-
@pytest.fixture
108107
def test_configs(request):
109108
"""Check that the repo config files are valid JSON and contain the expected
110109
sorts of values."""
111110
config_path = os.path.join(str(request.config.rootdir), 'highfive/configs')
112-
for fname in os.listdir(config_path):
113-
if fname.endswith('.json'):
114-
assert config_valid(os.path.join(config_path, fname))
111+
for root, _, files in os.walk(config_path):
112+
for fname in files:
113+
if fname.endswith('.json'):
114+
assert config_valid(os.path.join(root, fname))

0 commit comments

Comments
 (0)