Describe the bug
When running ti test, the main program throws an error saying that it is unable to recognize the argument -n1
Log/Screenshots
Running python tests...
ERROR: usage: ti [options] [file_or_dir] [file_or_dir] [...]
ti: error: unrecognized arguments: -n1
inifile: None
rootdir: /home/peiyuanl/taichi_dev/taichi
========================================================== test session starts ===========================================================
platform linux -- Python 3.7.6, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: [omitted]
plugins: xdoctest-0.12.0, cov-2.9.0
(the test successfully completed)
To Reproduce
Run ti test after correct setup and compilation on Ubuntu 16.04
tl;dr: pip install pytest-xdist.
For now we have to detect the pytest plugin xdist by running a dummy test:
https://github.com/taichi-dev/taichi/blob/e9b30006e8d34ab37350b8c0fda588fa7df06c74/python/taichi/main.py#L624-L629
It would be great if we can find some pytest API to detect if xdist is installed or not, would you mind to fix this? Thanks in advance!
Sure!
I dug around and I think there isn't a easy work around.
sys.module and xdist isn't listedpytest-xdist, the folder still persists, so that didn't work either.I guess right now we can print a few extra messages explaining that the error message is insignificant...
Most helpful comment
Sure!