From da4b29f3cd48726b21d1c37aff854d3e29ce1507 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Mon, 3 Feb 2014 22:45:38 +1300 Subject: [PATCH] First dumb test --- pytest.ini | 2 ++ tests.py | 9 +++++++++ tox.ini | 12 ++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 pytest.ini create mode 100644 tests.py create mode 100644 tox.ini 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