Skip to content

Commit

Permalink
chore(TCs): mark SLOW tests, when in hurry, +setup.cfg
Browse files Browse the repository at this point in the history
... to adopt pytest args
+ mark wheel a universal.
  • Loading branch information
ankostis committed Oct 8, 2019
1 parent 7f637fe commit ae01163
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ install:

script:
- pytest -v --cov=graphkit
# In case you adopt -m 'not slow' in setup.cfg.
#- pytest -vm slow --cov=graphkit

deploy:
provider: pypi
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Python's setup.cfg for tool defaults:
#
[bdist_wheel]
universal = 1


[tool:pytest]
# See http://doc.pytest.org/en/latest/mark.html#mark
markers =
slow: marks tests as slow, select them with `-m slow` or `-m 'not slow'`
2 changes: 2 additions & 0 deletions test/test_graphkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ def count_deletions(steps):
assert count_deletions(steps12) != count_deletions(steps22)


@pytest.mark.slow
def test_parallel_execution():
import time

Expand Down Expand Up @@ -633,6 +634,7 @@ def fn3(z, k=1):
# make sure results are the same using either method
assert result_sequential == result_threaded

@pytest.mark.slow
def test_multi_threading():
import time
import random
Expand Down
1 change: 1 addition & 0 deletions test/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def test_plotting_docstring():
assert ext in network.Network.plot.__doc__


@pytest.mark.slow
def test_plot_formats(pipeline, tmp_path):
## Generate all formats (not needing to save files)

Expand Down

0 comments on commit ae01163

Please sign in to comment.