Skip to content

Commit 129b5de

Browse files
committed
tests: updates for shared test data repo renaming
1 parent 02c81d8 commit 129b5de

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

tests/misc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def __init__(self):
3636

3737
# load repos
3838
for path in sorted(glob.glob(f"{DATADIR}/repos/*")):
39-
self._config.add_repo(path, id=os.path.basename(path), external=False)
39+
if not path.endswith("-invalid"):
40+
self._config.add_repo(path, id=os.path.basename(path), external=False)
4041

4142
# load toml files
4243
self._toml = {}

tests/repo/test_ebuild.py

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,16 @@ def test_eapi(self, make_raw_ebuild_repo):
9999
assert r.eapi is EAPI_LATEST_OFFICIAL
100100

101101
def test_masters(self):
102-
# primary repo
103-
primary_repo = TEST_DATA.repos["dependent-primary"]
104-
assert not primary_repo.masters
105-
106-
# dependent repo
107-
secondary_repo = TEST_DATA.repos["dependent-secondary"]
108-
assert secondary_repo.masters == (primary_repo,)
102+
primary = TEST_DATA.repos["primary"]
103+
assert not primary.masters
104+
secondary = TEST_DATA.repos["secondary"]
105+
assert secondary.masters == (primary,)
109106

110107
def test_licenses(self):
111-
# primary repo
112-
primary_repo = TEST_DATA.repos["dependent-primary"]
113-
assert primary_repo.licenses == ["a"]
114-
115-
# dependent repo
116-
secondary_repo = TEST_DATA.repos["dependent-secondary"]
117-
assert secondary_repo.licenses == ["a", "b"]
108+
primary = TEST_DATA.repos["primary"]
109+
assert primary.licenses == ["a"]
110+
secondary = TEST_DATA.repos["secondary"]
111+
assert secondary.licenses == ["a", "b"]
118112

119113
@pytest.mark.parallel
120114
def test_pkg_metadata_regen(self, tmpdir):
@@ -162,10 +156,7 @@ def test_categories(self, make_ebuild_repo):
162156
assert repo.metadata.categories == ["cat1", "cat2"]
163157

164158
def test_licenses(self):
165-
# primary repo
166-
primary_repo = TEST_DATA.repos["dependent-primary"]
167-
assert primary_repo.metadata.licenses == ["a"]
168-
169-
# dependent repo
170-
secondary_repo = TEST_DATA.repos["dependent-secondary"]
171-
assert secondary_repo.metadata.licenses == ["b"]
159+
primary = TEST_DATA.repos["primary"]
160+
assert primary.metadata.licenses == ["a"]
161+
secondary = TEST_DATA.repos["secondary"]
162+
assert secondary.metadata.licenses == ["b"]

0 commit comments

Comments
 (0)