mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
tests: Automatically create pytest marks for apps
Fixes: #2388. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
157abb023a
commit
a3b6506a4e
@ -23,6 +23,15 @@ def pytest_ignore_collect(path, config):
|
|||||||
return not _functional_libs_available
|
return not _functional_libs_available
|
||||||
|
|
||||||
|
|
||||||
|
def pytest_configure(config):
|
||||||
|
"""Register additional markers, one for each app."""
|
||||||
|
for app in (pathlib.Path(__file__).parent / 'modules').iterdir():
|
||||||
|
if not app.is_dir():
|
||||||
|
continue
|
||||||
|
|
||||||
|
config.addinivalue_line('markers', app.name)
|
||||||
|
|
||||||
|
|
||||||
def pytest_collection_modifyitems(config, items):
|
def pytest_collection_modifyitems(config, items):
|
||||||
"""Filter out specificly marked tests unless explicitly requested.
|
"""Filter out specificly marked tests unless explicitly requested.
|
||||||
|
|
||||||
|
|||||||
@ -136,62 +136,8 @@ markers = [
|
|||||||
"skip",
|
"skip",
|
||||||
"heavy",
|
"heavy",
|
||||||
"apps",
|
"apps",
|
||||||
"avahi",
|
|
||||||
"backups",
|
|
||||||
"bepasty",
|
|
||||||
"bind",
|
|
||||||
"calibre",
|
|
||||||
"cockpit",
|
|
||||||
"config",
|
|
||||||
"coturn",
|
|
||||||
"datetime",
|
|
||||||
"deluge",
|
|
||||||
"domain",
|
"domain",
|
||||||
"dynamicdns",
|
|
||||||
"ejabberd",
|
|
||||||
"email",
|
|
||||||
"gitweb",
|
|
||||||
"help",
|
|
||||||
"i2p",
|
|
||||||
"ikiwiki",
|
|
||||||
"infinoted",
|
|
||||||
"janus",
|
|
||||||
"jsxc",
|
|
||||||
"matrixsynapse",
|
|
||||||
"mediawiki",
|
|
||||||
"minetest",
|
|
||||||
"minidlna",
|
|
||||||
"mumble",
|
|
||||||
"openvpn",
|
|
||||||
"pagekite",
|
|
||||||
"performance",
|
|
||||||
"privacy",
|
|
||||||
"privoxy",
|
|
||||||
"quassel",
|
|
||||||
"radicale",
|
|
||||||
"roundcube",
|
|
||||||
"rssbridge",
|
|
||||||
"samba",
|
|
||||||
"searx",
|
|
||||||
"security",
|
|
||||||
"shaarli",
|
|
||||||
"shadowsocks",
|
|
||||||
"shadowsocksserver",
|
|
||||||
"sharing",
|
|
||||||
"snapshot",
|
|
||||||
"ssh",
|
|
||||||
"sso",
|
|
||||||
"storage",
|
|
||||||
"syncthing",
|
|
||||||
"system",
|
"system",
|
||||||
"tor",
|
|
||||||
"transmission",
|
|
||||||
"ttrss",
|
|
||||||
"upgrades",
|
|
||||||
"users",
|
|
||||||
"wireguard",
|
|
||||||
"wordpress",
|
|
||||||
"zoph",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Useful when pylint is invoked separately instead of flake8
|
# Useful when pylint is invoked separately instead of flake8
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user