Skip to content
Snippets Groups Projects
Commit a7d844df authored by ulif's avatar ulif
Browse files

Disable packaging-related tests by default.

We now `pytest.mark` tests that are mainly related to packaging and
disable them by default. This is a first workaround for broken
year-checks. These tests blindly fail when the current year does not
equal the one mentioned in docs and version string.

In fact the tests should compare the year in docs/version string with
the year of "current" commit (with "current commit" being the one
representing the tested codebase). Another issue to be addressed.

All tests can be run by: `py.test -m ""`, the packaging-only tests can
be run by `py.test -m "packaging"`. `tox` got a new env called `pkg`.
parent cbdfbac8
No related branches found
No related tags found
No related merge requests found
......@@ -251,6 +251,7 @@ class TestDicewareModule(object):
assert err == ''
assert __version__ in out
@pytest.mark.packaging
def test_print_version_current_year(self, capsys):
# in version infos we display the current year
print_version()
......
......@@ -17,6 +17,7 @@ def manpage(request):
class TestManpage(object):
@pytest.mark.packaging
def test_manpage_contains_current_year(self, manpage):
# the current year appears at least in the manpage
assert str(datetime.datetime.now().year) in manpage
[pytest]
addopts = --doctest-modules --doctest-glob='*.rst'
addopts = --doctest-modules --doctest-glob='*.rst' -m 'not packaging'
diceware tests docs README.rst
[tox]
envlist = flake8, pypy, py26, py27, py33, py34, py35, py36, coverage
envlist = flake8, pypy, py26, py27, py33, py34, py35, py36, coverage, pkg
[testenv]
usedevelop=True
......@@ -35,3 +35,10 @@ commands=
coverage erase
coverage run setup.py test
coverage report --include='diceware*,setup.py' -m --fail-under=100
[testenv:pkg]
# run only tests marked as 'packaging'-related
deps=
pytest==3.2.5
commands=
py.test -m 'packaging'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment