diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..258cfb7c --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +python_files = test*.py \ No newline at end of file diff --git a/tests.py b/tests.py new file mode 100644 index 00000000..bd45004a --- /dev/null +++ b/tests.py @@ -0,0 +1,9 @@ +from __future__ import unicode_literals +from tqdm import format_interval + + +def test_format_interval(): + assert format_interval(60) == '01:00' + assert format_interval(6160) == '1:42:40' + assert format_interval(238113) == '66:08:33' + diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..ecd9f5e9 --- /dev/null +++ b/tox.ini @@ -0,0 +1,12 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py26, py27, py32 + +[testenv] +commands = py.test +deps = + pytest \ No newline at end of file