testing only works when called from directory with setup.py (top of repo)

Issue #39 new
Anthon van der Neut
created an issue

DATA, the path to the data files for testing specified in tests/lib/test_appliance.py is hard coded to be tests/data. This makes it impossible to run the tests from any other directory than the top of the repository. You cannot do:

cd tests/data
edit some_test.code
python ../lib/test_yaml.py

changing to:

DATA = __file__.rsplit("/", 2)[0] + "/data"

allows you to start the tests from any directory (not tested on WIndows, might need os.sep instead of "/")