Changeset 9464


Ignore:
Timestamp:
Dec 1, 2014 12:32:19 AM (4 years ago)
Author:
wehart
Message:

Changing the test generation to create a tester
whose arguments are the name that is specified.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyomo/trunk/pyomo/solvers/tests/pickling/test_pickle.py

    r9239 r9464  
    1515    # Skip this test if the solver is not available on the system
    1616    if test_case.available is False:
    17         def skipping_test(self):
     17        def skipping_test(self, name):
    1818            return self.skipTest('Solver unavailable: '+test_case.name+' ('+test_case.io+')')
    1919        return skipping_test
    2020
    21     def testMethod(self):
     21    def testMethod(self, name):
    2222       
    2323        files_to_delete = []
     
    7070def assignTests(cls):
    7171    for case in testCases:
    72         attrName = "test_pickle_{0}_{1}".format(case.name,case.io)
    73         setattr(cls,attrName,createTestMethod(attrName,case))
     72        attrName = "pickle_{0}_{1}".format(case.name,case.io)
     73        cls.add_fn_test(name=attrName, fn= createTestMethod(attrName,case))
    7474
    7575class PickleTest(unittest.TestCase):
Note: See TracChangeset for help on using the changeset viewer.