Changeset 2272


Ignore:
Timestamp:
Feb 5, 2010 6:59:46 PM (10 years ago)
Author:
jwatson
Message:

Various fixes to PySP unit tests. Changing name of testphextension to examplephextension - with the test prefix, coverage tests import the module, which causes all kinds of issues.

Location:
coopr.pysp/trunk/coopr/pysp
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/examplephextension.py

    r2269 r2272  
    1212from coopr.pysp import phextension
    1313
    14 class testphextension(SingletonPlugin):
     14class examplephextension(SingletonPlugin):
    1515
    1616    implements (phextension.IPHExtension)
  • coopr.pysp/trunk/coopr/pysp/tests/unit/test_ph.py

    r2271 r2272  
    6363        argstring = "runph --solver=cplex --solver-manager=serial --model-directory="+model_dir+" --instance-directory="+instance_dir
    6464        args = string.split(argstring)
    65         sys.argv = args
    66         coopr.pysp.phinit.run()
     65        coopr.pysp.phinit.run(args=args)
    6766        pyutilib.misc.reset_redirect()       
    6867        self.failUnlessFileEqualsBaseline(curr_dir+"farmer_quadratic.out",curr_dir+"farmer_quadratic.baseline", filter=filter_time)
     
    7978        argstring = "runph --solver=cplex --solver-manager=serial --model-directory="+model_dir+" --instance-directory="+instance_dir+" --linearize-nonbinary-penalty-terms=10"
    8079        args = string.split(argstring)
    81         sys.argv = args
    82         coopr.pysp.phinit.run()       
     80        coopr.pysp.phinit.run(args=args)       
    8381        pyutilib.misc.reset_redirect()       
    8482        self.failUnlessFileEqualsBaseline(curr_dir+"farmer_linearized.out",curr_dir+"farmer_linearized.baseline", filter=filter_time)
     
    104102        args = string.split(argstring)
    105103        print "ARGS=",args
    106         sys.argv = args
    107         coopr.pysp.phinit.run()               
     104        coopr.pysp.phinit.run(args=args)               
    108105        pyutilib.misc.reset_redirect()
    109106        print args
Note: See TracChangeset for help on using the changeset viewer.