1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

add unit test to timeutils.py

tweak .travis.yml
This commit is contained in:
Ilya Kreymer 2014-02-25 15:30:16 -08:00
parent b5d8accd1d
commit 349a1a7a3a
2 changed files with 6 additions and 3 deletions

View File

@ -3,9 +3,8 @@ python:
- "2.7"
# command to install dependencies
install:
- "python setup.py -q install"
- "pip install python-coveralls"
- "pip install pytest-cov"
- python setup.py -q install
- pip install coverage pytest-cov coveralls --use-mirrors
# command to run tests
#script: nosetests --with-doctest
#script: py.test run-tests.py ./pywb/ --doctest-modules --ignore=setup.py

View File

@ -162,6 +162,10 @@ def timestamp_to_datetime(string):
>>> timestamp_to_datetime('40001965252477')
datetime.datetime(2999, 12, 31, 23, 24, 59)
# not a number!
>>> timestamp_to_datetime('2010abc')
datetime.datetime(2010, 12, 31, 23, 59, 59)
"""
# pad to 6 digits