Changeset 5825


Ignore:
Timestamp:
May 29, 2012 11:29:59 AM (7 years ago)
Author:
jwatson
Message:

Adding tolerance parameters for test-to-baseline comparisons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.opt/trunk/coopr/opt/tests/base/test_ampl.py

    r5806 r5825  
    5555                self.fail("Unexpected ConverterError - ampl is enabled but not available: '%s'" % str(err))
    5656            return
    57         self.assertFileEqualsBaseline(currdir+'test3.nl', currdir+'test3.baseline.nl', filter=filter)
     57        self.assertFileEqualsBaseline(currdir+'test3.nl', currdir+'test3.baseline.nl', filter=filter, tolerance=1e-5)
    5858
    5959    def test3_write_lp(self):
     
    7070                self.fail("Unexpected ConverterError - glpsol is enabled but not available: '%s'" % str(err))
    7171            return
    72         self.assertFileEqualsBaseline(currdir+'test3.lp', currdir+'test3.baseline.lp', filter=filter)
     72        self.assertFileEqualsBaseline(currdir+'test3.lp', currdir+'test3.baseline.lp', filter=filter, tolerance=1e-5)
    7373
    7474    def test3_write_mps(self):
     
    8585                self.fail("Unexpected ConverterError - glpsol is enabled but not available: '%s'" % str(err))
    8686            return
    87         self.assertFileEqualsBaseline(currdir+'test3.mps', currdir+'test3.baseline.mps', filter=filter)
     87        self.assertFileEqualsBaseline(currdir+'test3.mps', currdir+'test3.baseline.mps', filter=filter, tolerance=1e-5)
    8888
    8989    def test3a_write_nl(self):
     
    100100                self.fail("Unexpected ConverterError - ampl is enabled but not available: '%s'" % str(err))
    101101            return
    102         self.assertFileEqualsBaseline(currdir+'test3a.nl', currdir+'test3.baseline.nl', filter=filter)
     102        self.assertFileEqualsBaseline(currdir+'test3a.nl', currdir+'test3.baseline.nl', filter=filter, tolerance=1e-5)
    103103
    104104    def test3a_write_lp(self):
     
    115115                self.fail("Unexpected ConverterError - glpsol is enabled but not available: '%s'" % str(err))
    116116            return
    117         self.assertFileEqualsBaseline(currdir+'test3a.lp', currdir+'test3.baseline.lp', filter=filter)
     117        self.assertFileEqualsBaseline(currdir+'test3a.lp', currdir+'test3.baseline.lp', filter=filter, tolerance=1e-5)
    118118
    119119    def test3a_write_mps(self):
     
    130130                self.fail("Unexpected ConverterError - glpsol is enabled but not available: '%s'" % str(err))
    131131            return
    132         self.assertFileEqualsBaseline(currdir+'test3a.mps', currdir+'test3.baseline.mps', filter=filter)
     132        self.assertFileEqualsBaseline(currdir+'test3a.mps', currdir+'test3.baseline.mps', filter=filter, tolerance=1e-5)
    133133
    134134    def test3_solve(self):
Note: See TracChangeset for help on using the changeset viewer.