0

I am not much familiar with python development on Windows 7 so I am going through problems to run tests of Apache Libcloud. I am trying to run the tests for a dns driver.

The following is the command I am using.

python libcloud/test/dns/test_luadns.py

And I get the following errors.

Traceback (most recent call last): File "test/dns/test_luadns.py", line 4, in from libcloud.utils.py3 import httplib ImportError: No module named libcloud.utils.py3

Everything worked well on my Ubuntu development machine when using the following command.

PYTHONPATH=. python libcloud/test/dns/test_luadns.py

orthodoxpirate
  • 1,934
  • 2
  • 17
  • 17

1 Answers1

0

If you want to execute a test suite directly in libcloud, call

python -m libcloud.test.dns.test_luadns

from within the libcloud source directory root. This will use Pythons default module loader path.

The correct way to run tests for libcloud is using tox, for Python 2.7 you run

tox -e py2.7

It will create the virtual environment and run the full test suite.

For setting Windows environment variables, using the PowerShell you can call

[Environment]::SetEnvironmentVariable("PYTHON_PATH", "<path to source>", "User")
anthony shaw
  • 133
  • 11