rbit / pydtls

Datagram Transport Layer Security for Python
Apache License 2.0
72 stars 45 forks source link

Unit.py failure to run #3

Closed doneir closed 10 years ago

doneir commented 10 years ago

Trying to run the unit.py script directly results in a failure due to dtls import not being found, either the PATH needs adapting before the dtls import, or a relative import used, or another solution sought.

Quick fix example for unit.py line 24, just before the dtls import statement:

for p in ('../../',):
    sys.path.insert(0,os.path.normpath(os.path.join(os.path.dirname(__file__), p)))
rbit commented 10 years ago

You can execute the unit tests by running "python -m dtls.test.unit" from the pydtls root directory. This works even if you've just cloned and not run setup.