kliff icon indicating copy to clipboard operation
kliff copied to clipboard

Please add 'test_requires' to setup.py

Open yurivict opened this issue 3 years ago • 4 comments

tests fail with:

ImportError: Failed to import test module: calculator_torch
...
ImportError: Failed to import test module: linear_regression
...
ImportError: Failed to import test module: model_torch
...
ImportError: Failed to import test module: nn
...

yurivict avatar Aug 04 '21 22:08 yurivict

Hi @yurivict. How did you get these errors, via python setup.py test? These modules based on PyTorch are not needed for the current tests. Also, we use pytest in this project instead of unittest.

mjwen avatar Aug 06 '21 02:08 mjwen

python setup.py test prints these messages.

yurivict avatar Aug 06 '21 02:08 yurivict

python setup.py test is deprecated:

$ python setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version.

tests_require is also deprecated by setuptool. We'll add tests requirements to extras_require.

mjwen avatar Aug 06 '21 05:08 mjwen

Then README needs to say how to run tests.

yurivict avatar Aug 06 '21 05:08 yurivict