Blosc / bcolz

A columnar data container that can be compressed.
http://bcolz.blosc.org
959 stars 149 forks source link

if we install the test and suggest to run them to #221

Open esc opened 9 years ago

esc commented 9 years ago

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 a pip install -v bcolz and so one test will fail.

FrancescElies commented 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?

esc commented 9 years ago

not really, mock is part of the standardlib in Python 3.something. So moving forward we will not need to install mock explicitly.

waylonflinn commented 9 years ago

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