mirror of
https://github.com/LazoCoder/Pokemon-Terminal
synced 2024-12-11 21:12:55 +00:00
16 lines
711 B
Python
16 lines
711 B
Python
from pokemonterminal.wallpaper import _get_adapter_classes
|
|
import os.path as __p
|
|
import inspect as __inspct
|
|
|
|
|
|
def test_wallpaper_adapter_classes():
|
|
all_adapter = _get_adapter_classes()
|
|
files = {__inspct.getfile(x) for x in all_adapter}
|
|
print('all adapter classes:\n', files)
|
|
assert len(all_adapter) >= len(files), \
|
|
"Some of the files in the adapter module don't define an adapter"
|
|
module_name = {x.__name__: __p.splitext(__p.basename(
|
|
__inspct.getfile(x)))[0] for x in all_adapter}
|
|
print("'class: module' map\n", module_name)
|
|
assert all(y.lower() in x.lower() for x, y in module_name.items()), \
|
|
"Some of the adapters are defined in unrelated named modules"
|