Skip to content

Commit

Permalink
refs #6667 Apparently more places where almost equal does not work on
Browse files Browse the repository at this point in the history
Unix
  • Loading branch information
abuts committed Jul 9, 2013
1 parent a01b0cb commit bb18353
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Code/Mantid/scripts/test/DirectEnergyConversionTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ def test_set_non_default_complex_value(self):
kw["ei-mon1-spec"]=10
prop_changed=tReducer.set_input_parameters(**kw)

self.assertAlmostEqual(tReducer.norm_mon_integration_range,[50,1050],7)
range=tReducer.norm_mon_integration_range
self.assertAlmostEqual(range[0],50.,7)
self.assertAlmostEqual(range[1],1050.,7)
self.assertEqual(tReducer.ei_mon_spectra,[10,41475])

self.assertTrue("norm_mon_integration_range" in prop_changed,"mon_norm_range should change")
Expand Down Expand Up @@ -173,10 +175,17 @@ def test_comlex_set(self):
tReducer = self.reducer

tReducer.energy_bins='-30,3,10'
self.assertEqual([-30,3,10],tReducer.energy_bins)
bins = tReducer.energy_bins
self.assertAlmostEqual(bins[0],-30)
self.assertAlmostEqual(bins[1],3)
self.assertAlmostEqual(bins[2],10)


tReducer.energy_bins=[-20,4,100]
self.assertEqual([-20,4,100],tReducer.energy_bins)
bins = tReducer.energy_bins
self.assertAlmostEqual(bins[0],-20)
self.assertAlmostEqual(bins[1],4)
self.assertAlmostEqual(bins[2],100)

tReducer.map_file = "some_map"
self.assertEqual("some_map.map",tReducer.map_file)
Expand Down

0 comments on commit bb18353

Please sign in to comment.