sfepy/sfepy — Issue #41: test_io fails
Author: rc
Created: 2012-01-30 10:24:35+00:00
State: open

$ ./runTests.py tests/test_io.py --debug
<<< tests/test_io.py
sfe: warning: other missing: ['fileName_mesh', 'field_[0-9]+|fields',
'ebc_[0-9]+|ebcs', 'fe', 'equations', 'region_[0-9]+|regions',
'variable_[0-9]+|variables', 'material_[0-9]+|materials',
'integral_[0-9]+|integrals', 'solver_[0-9]+|solvers', 'functions',
'modules', 'epbc_[0-9]+|epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs',
'options']
sfe: warning: left over: ['nm', 'sp', 'TestCommon', 'op']
>>> test instance prepared (2 test(s))
... {'A': 0, 'B': {'C': [0, 1], 'D': {'E': {'F': {'G': 2.0}}}}}
... saving into output-tests/dict.h5...
>>> <type 'exceptions.NameError'>
Traceback (most recent call last):
File "./runTests.py", line 222, in <module>
main()
File "./runTests.py", line 210, in main
stats = runTest( testFileName, options )
File "./runTests.py", line 111, in runTest
ok, nFail, nTotal = test.run( options.debug )
File "/home/ondra/sfepy/sfe/base/testing.py", line 38, in run
ret = testMethod()
File "tests/test_io.py", line 55, in test_recursiveDictHDF5
writeDictHDF5( fileName, test )
File "/home/ondra/sfepy/sfe/base/ioutils.py", line 330, in writeDictHDF5
fd = pt.openFile( fileName, mode = "w",
NameError: global name 'pt' is not defined

if the problem is in not installing some module, it should say so, instead
of rising the NameError exception.

Migrated from http://code.google.com/p/sfepy/issues/detail?id=37

earlier comments

robert.cimrman said, at 2008-06-12T12:00:35.000Z:

tests/test_io.py
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok

Do you have pytables? I will update the test to be skipped if it is missing.

ondrej.certik said, at 2008-06-12T12:06:43.000Z:

I think I didn't have them installed.

robert.cimrman said, at 2008-06-12T13:47:23.000Z:

And now you do not need to...