diff --git a/tests/test_diceware.py b/tests/test_diceware.py index 50f16e750ad5a42ccfb9506100b12baa69a50a37..86807b0d401a5c89e4fc44d0bac1477939f5649e 100644 --- a/tests/test_diceware.py +++ b/tests/test_diceware.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals +import datetime import os import pytest import sys @@ -151,6 +152,13 @@ class TestDicewareModule(object): assert err == '' assert __version__ in out + def test_print_version_current_year(self, capsys): + # in version infos we display the current year + print_version() + expected = '(C) %s' % (datetime.datetime.now().year) + out, err = capsys.readouterr() + assert expected in out + def test_handle_options(self): # we can get help with pytest.raises(SystemExit) as exc_info: