I am stubbornly trying to convert the Python module https://github.com/theatlantic/python-active-directory to Python 3. You can see my efforts here https://github.com/nbmorgan/python-active-directory/tree/master3.
I have figured out the following things, I can run the test suite within the cloned project by either:
export TEST_CONF_NAME="test.conf" ; python setup.py test
orexport TEST_CONF_NAME="../test.conf" ; python setup.py nosetests
This creates a huge output with the first simple test at the top. I have tried to use several forms of the run single test variations described in the help for setup or nosetest, but I'm usually met with module not found
errors or some variant of test not defined
.
If someone could point me at the command line that would let me run just: test_client.TestADClient.test_domains
that would be awesome.
For now I am using: export TEST_CONF_NAME="../test.conf" ; python setup.py nosetests 2>&1 | cat -n | head -80 | tail -31
which is cheesy, but gets me the information.
I would like to thank the author for having tests - which makes a cold approach to a refactor possible. I am not a Python module builder, just a module user trying to help.
Is running using setup
a requirement? I run certain test like this:
nosetests tests/core/test_client.py:TestADClient.test_search --collect
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
But actual run fails because tests use pytest fixture (conf argument for tests). So you need to run it using pytest.
$ pytest tests/core/test_client.py::TestADClient::test_search -vv
============================ test session starts ============
...
collected 1 item
tests/core/test_client.py::TestADClient::test_search SKIPPED [100%]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With