forked from MatPoliquin/stable-retro
-
Notifications
You must be signed in to change notification settings - Fork 1
/
conftest.py
26 lines (21 loc) · 866 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pytest
import retro.data
inttypes = {
'exp': retro.data.Integrations.EXPERIMENTAL_ONLY,
'contrib': retro.data.Integrations.CONTRIB_ONLY,
}
def pytest_collection_modifyitems(items):
def test(*args, **kwargs):
print(kwargs)
return False
for item in items:
if item.originalname in ('test_load', 'test_rom', 'test_state', 'test_hash'):
for key in item.keywords.keys():
if '[' + key + ']' not in item.nodeid:
continue
game = key.split('_')
gamename = '%s-%s' % (game[0], game[1])
try:
retro.data.get_romfile_path(gamename, inttypes[game[2]] if len(game) > 2 else retro.data.Integrations.STABLE)
except (FileNotFoundError, KeyError):
item.add_marker(pytest.mark.skip)