def test_all(): """###running unit tests on cobra py###""" import sys sys.path.insert(0, "../..") import unittest from cobra.test.unit_tests import test_all print '###running general unit tests###' test_all() from cobra.test.flux_analysis import test_all print '\n###running flux_analysis unit tests###' test_all() print '\n###running solver unit tests###' from cobra.test.solvers import test_all test_all() sys.path.pop(0)
"""returns the salmonella model for testing""" try: from cPickle import load except: from pickle import load with open(test_pickle, "rb") as infile: model = load(infile) return model def test_all(): """###running unit tests on cobra py###""" import sys sys.path.insert(0, "../..") import unittest from cobra.test.unit_tests import test_all print '###running general unit tests###' test_all() from cobra.test.flux_analysis import test_all print '\n###running flux_analysis unit tests###' test_all() print '\n###running solver unit tests###' from cobra.test.solvers import test_all test_all() sys.path.pop(0) del __abspath, __join, __split, __sep if __name__ == '__main__': test_all()