Skip to content

Commit 92e3210

Browse files
committed
updated test code
1 parent 86825af commit 92e3210

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/CBXML.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
Author: Brett G. Olivier
2121
Contact email: [email protected]
22-
Last edit: $Author: bgoli $ ($Id: CBXML.py 660 2018-09-24 14:57:04Z bgoli $)
22+
Last edit: $Author: bgoli $ ($Id: CBXML.py 663 2018-09-25 13:04:39Z bgoli $)
2323
2424
"""
2525
## gets rid of "invalid variable name" info
@@ -3111,7 +3111,7 @@ def sbml_readSBML3FBC(fname, work_dir=None, return_sbml_model=False, xoptions={}
31113111

31123112
# check for file read errors
31133113
if D.getNumErrors() > 0:
3114-
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()))
3114+
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()))
31153115
errors, warnings, others, DOCUMENT_VALID, MODEL_VALID = sbml_validateDocument(D, docread=True)
31163116
if not DOCUMENT_VALID:
31173117
raise RuntimeError("\nERROR: Validation has detected an invalid SBML document This is a fatal error.\n")

src/nosetests/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
# preparing for Python 3 port
2+
from __future__ import division, print_function
3+
from __future__ import absolute_import
4+
#from __future__ import unicode_literals
5+
16
import os, nose
7+
import cbmpy
8+
29
fDir = os.path.split(__file__)[0]
10+
#fDir = os.path.split(fDir)[0]
11+
print('TestBase: ', fDir)
312

413
def run():
514
cDir = os.getcwd()
@@ -8,4 +17,9 @@ def run():
817
os.chdir(cDir)
918
if res:
1019
print('\nAll tests passed.\n')
20+
else:
21+
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')
1122

23+
class TestBase:
24+
def test_import(self):
25+
import cbmpy

0 commit comments

Comments
 (0)