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

switch test framework to use py.test instead of nose

This commit is contained in:
Ilya Kreymer 2014-02-01 00:12:11 -08:00
parent 6d2c8286ca
commit 2f5ffb3a88
3 changed files with 8 additions and 5 deletions

View File

@ -5,4 +5,5 @@ python:
install:
- "python setup.py -q install"
# command to run tests
script: nosetests --with-doctest
#script: nosetests --with-doctest
script: py.test run-tests.py ./pywb/ --doctest-modules --ignore=setup.py

View File

@ -224,14 +224,16 @@ def unsurt(surt):
#=================================================================
# Support for bulk doctest testing via nose
# Support for bulk doctest testing via nose or py.test
# nosetests --with-doctest
# py.test --doctest_modules
import sys
is_in_nose = sys.argv[0].endswith('nosetests')
is_in_testtool = any(sys.argv[0].endswith(tool) for tool in ['py.test', 'nosetests'])
def enable_doctests():
return is_in_nose
return is_in_testtool
def test_data_dir():
import os

View File

@ -12,6 +12,6 @@ setuptools.setup(name='pywb',
license='GPL',
packages=['pywb'],
install_requires=['uwsgi', 'rfc3987', 'chardet', 'redis', 'jinja2', 'surt', 'pyyaml', 'WebTest'],
# test_suite='?', # not sure how to run doctests here
tests_require['WebTest', 'pytest'],
zip_safe=False)