Open esc opened 9 years ago
Would be an option to use unittest.skipIf
with something like bcolz.mock_here
in similar way like https://github.com/Blosc/bcolz/pull/218?
not really, mock is part of the standardlib in Python 3.something. So moving forward we will not need to install mock explicitly.
Partial solution: the test_requires
argument works when building from source (but doesn't work for pip
)
test_requires = [
'mock',
'nose',
]
setup(name='repoapi',
...
install_requires=install_requires,
tests_require=test_requires,
test_suite="nose.collector",
...
)
should work with
python setup.py test
Shamelessly stolen from: http://stackoverflow.com/a/15422703/74291
As a user I wan to execute the test suite to check the installation, however this also means that all the test requirements must also be installed.
For example
mock
will not be installed with apip install -v bcolz
and so one test will fail.