lizardsystem/lizard-waterbalance — Issue #21: Several unit tests in xmlmodel.reader_tests depend on the working directory
Author: swinkels
Created: 2011-11-14 14:10:23+00:00
State: open

When I run the unit tests from another directory than lizard-waterbalance, severak unit tests xmlmodel.reader_tests fail:

tests :: (vss*) » ../bin/test
/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/eggs/Django-1.3-py2.6.egg/django/db/__init__.py:60: DeprecationWarning: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.'
DeprecationWarning
nosetests --verbosity 1 lizard_waterbalance lizard_wbcomputation xmlmodel
Creating test database for alias 'default'...
Creating test database for alias 'fews-unblobbed'...
.............................................................................EEEEE
======================================================================
ERROR: test_retrieve_from_timeseries_evaporation (xmlmodel.reader_tests.CoupleParametersWithTimeseriesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader_tests.py", line 42, in setUp
self.root = parse_parameters("xmlmodel/gebiedsbeschrijving.xml")
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader.py", line 237, in parse_parameters
d = parse(stream)
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'xmlmodel/gebiedsbeschrijving.xml'

======================================================================
ERROR: test_retrieve_from_timeseries_precipitation (xmlmodel.reader_tests.CoupleParametersWithTimeseriesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader_tests.py", line 42, in setUp
self.root = parse_parameters("xmlmodel/gebiedsbeschrijving.xml")
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader.py", line 237, in parse_parameters
d = parse(stream)
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'xmlmodel/gebiedsbeschrijving.xml'

======================================================================
ERROR: test_retrieve_not_existing_gives_exception (xmlmodel.reader_tests.CoupleParametersWithTimeseriesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader_tests.py", line 42, in setUp
self.root = parse_parameters("xmlmodel/gebiedsbeschrijving.xml")
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader.py", line 237, in parse_parameters
d = parse(stream)
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'xmlmodel/gebiedsbeschrijving.xml'

======================================================================
ERROR: test_select_timeseries_evaporation (xmlmodel.reader_tests.CoupleParametersWithTimeseriesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader_tests.py", line 42, in setUp
self.root = parse_parameters("xmlmodel/gebiedsbeschrijving.xml")
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader.py", line 237, in parse_parameters
d = parse(stream)
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'xmlmodel/gebiedsbeschrijving.xml'

======================================================================
ERROR: test_select_timeseries_precipitation (xmlmodel.reader_tests.CoupleParametersWithTimeseriesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader_tests.py", line 42, in setUp
self.root = parse_parameters("xmlmodel/gebiedsbeschrijving.xml")
File "/home/pieter/github.com/krw-waternet/src/lizard-waterbalance/xmlmodel/reader.py", line 237, in parse_parameters
d = parse(stream)
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: 'xmlmodel/gebiedsbeschrijving.xml'

----------------------------------------------------------------------
Ran 82 tests in 0.263s

FAILED (errors=5)
Destroying test database for alias 'default'...
Destroying test database for alias 'fews-unblobbed'...
tests :: (vss*) »