Mark slow unit tests (#6994)

* Marking database tests as slow

* Marking url command tests as slow

* Marking every test that uses database as slow

* Marking tests that import files as slow

* Marking gpg tests as slow

* Marking all versions and one list tests as slow

* Added more markers to unit tests + cli option to skip slow tests

Following a discussion with Axel, the generic 'slowtest' marker has been
split into 'db', 'network' and 'maybeslow'. A brief description of the
meaning of each marker has been added to pytest.ini.

A command line option to run only fast tests has been added to
'spack test'

* Don't use classes to group tests together

Reverted grouping tests under a class, as required in the review

* Minor style changes
This commit is contained in:
Massimiliano Culpo
2018-01-29 15:19:50 +01:00
committed by Todd Gamblin
parent f27c5e74ed
commit 7368586f0d
16 changed files with 193 additions and 72 deletions

View File

@@ -2,4 +2,8 @@
[pytest]
addopts = --durations=20 -ra
testpaths = lib/spack/spack/test
python_files = *.py
python_files = *.py
markers =
db: tests that require creating a DB
network: tests that require access to the network
maybeslow: tests that may be slow (e.g. access a lot the filesystem, etc.)