diff --git a/src/CBXML.py b/src/CBXML.py index ff3367d..be7f626 100644 --- a/src/CBXML.py +++ b/src/CBXML.py @@ -19,7 +19,7 @@ Author: Brett G. Olivier Contact email: bgoli@users.sourceforge.net -Last edit: $Author: bgoli $ ($Id: CBXML.py 660 2018-09-24 14:57:04Z bgoli $) +Last edit: $Author: bgoli $ ($Id: CBXML.py 663 2018-09-25 13:04:39Z bgoli $) """ ## gets rid of "invalid variable name" info @@ -3111,7 +3111,7 @@ def sbml_readSBML3FBC(fname, work_dir=None, return_sbml_model=False, xoptions={} # check for file read errors if D.getNumErrors() > 0: - print('***\nDANGER: libSBML reports *{}* read errors, this indicates that this is an invalid SBML file. I will try to load it but cannot guarantee it\'s accuracy.\n***\n'.format(D.getNumErrors())) + print('***\nDANGER: libSBML reports *{}* read errors, this indicates that this is an invalid SBML file. I will try to load it but cannot guarantee its accuracy.\n***\n'.format(D.getNumErrors())) errors, warnings, others, DOCUMENT_VALID, MODEL_VALID = sbml_validateDocument(D, docread=True) if not DOCUMENT_VALID: raise RuntimeError("\nERROR: Validation has detected an invalid SBML document This is a fatal error.\n") diff --git a/src/nosetests/__init__.py b/src/nosetests/__init__.py index 5533dd6..12e0e0f 100644 --- a/src/nosetests/__init__.py +++ b/src/nosetests/__init__.py @@ -1,5 +1,14 @@ +# preparing for Python 3 port +from __future__ import division, print_function +from __future__ import absolute_import +#from __future__ import unicode_literals + import os, nose +import cbmpy + fDir = os.path.split(__file__)[0] +#fDir = os.path.split(fDir)[0] +print('TestBase: ', fDir) def run(): cDir = os.getcwd() @@ -8,4 +17,9 @@ def run(): os.chdir(cDir) if res: print('\nAll tests passed.\n') + else: + print('\nPlease ignore the second test failure:\n\n\"ERROR: Failure: ImportError (No module named cbmpy)\"\n\nthis is a known glitch in the testing framework that is currently being worked on.\n') +class TestBase: + def test_import(self): + import cbmpy