diff --git a/interfaces/cython/cantera/test/test_onedim.py b/interfaces/cython/cantera/test/test_onedim.py index 110ed013e..9a89f6a3b 100644 --- a/interfaces/cython/cantera/test/test_onedim.py +++ b/interfaces/cython/cantera/test/test_onedim.py @@ -241,7 +241,7 @@ class TestFreeFlame(utilities.CanteraTest): self.create_sim(p, Tin, reactants) self.solve_fixed_T() - filename = 'onedim-fixed-T.xml' + filename = 'onedim-fixed-T{0}.xml'.format(utilities.python_version) if os.path.exists(filename): os.remove(filename) @@ -302,7 +302,7 @@ class TestFreeFlame(utilities.CanteraTest): p = 2 * ct.one_atm Tin = 400 - filename = 'onedim-add-species.xml' + filename = 'onedim-add-species{0}.xml'.format(utilities.python_version) if os.path.exists(filename): os.remove(filename) @@ -330,7 +330,7 @@ class TestFreeFlame(utilities.CanteraTest): p = 2 * ct.one_atm Tin = 400 - filename = 'onedim-add-species.xml' + filename = 'onedim-add-species{0}.xml'.format(utilities.python_version) if os.path.exists(filename): os.remove(filename) diff --git a/interfaces/cython/cantera/test/utilities.py b/interfaces/cython/cantera/test/utilities.py index cb705ba5e..8a53ff6a7 100644 --- a/interfaces/cython/cantera/test/utilities.py +++ b/interfaces/cython/cantera/test/utilities.py @@ -4,6 +4,8 @@ import os import warnings _ver = sys.version_info[:2] +python_version = str(_ver[0]) + if _ver < (2,7) or (3,0) <= _ver < (3,2): # unittest2 is a backport of the new features added to the unittest # testing framework in Python 2.7 and Python 3.2. See