tests: Add a not_osx platform marker.

This commit is contained in:
Florian Bruhin 2015-10-02 08:51:26 +02:00
parent 9f7836131d
commit b88a22b139
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ markers =
windows: Tests which only can run on Windows.
linux: Tests which only can run on Linux.
osx: Tests which only can run on OS X.
not_osx: Tests which can not run on OS X.
not_frozen: Tests which can't be run if sys.frozen is True.
frozen: Tests which can only be run if sys.frozen is True.
integration: Tests which test a bigger portion of code, run without coverage.

View File

@ -89,6 +89,7 @@ def pytest_runtest_setup(item):
('windows', os.name != 'nt', "Requires Windows"),
('linux', not sys.platform.startswith('linux'), "Requires Linux"),
('osx', sys.platform != 'darwin', "Requires OS X"),
('not_osx', sys.platform == 'darwin', "Skipped on OS X"),
('not_frozen', getattr(sys, 'frozen', False),
"Can't be run when frozen"),
('frozen', not getattr(sys, 'frozen', False),