Commits
Ville Suoranta authored a3419797cc6 Merge
64 64 | self.assertIsNone(opac) |
65 65 | |
66 66 | def test2(self): |
67 67 | '''Test 2: ms with no weather, no plot ''' |
68 68 | if (os.path.exists(self.msNoWeatherfile)): |
69 69 | shutil.rmtree(self.msNoWeatherfile) |
70 70 | shutil.copytree(datapath+self.msNoWeatherfile, self.msNoWeatherfile) |
71 71 | |
72 72 | opac = plotweather(vis=self.msNoWeatherfile, plotName=self.fig) |
73 73 | self.assertIsNotNone(opac) |
74 - | self.assertAlmostEqual(opac[0], 0.0054234724819465846) |
74 + | self.assertAlmostEqual(opac[0], 0.0054260513220809048) |
75 75 | self.assertFalse(os.path.exists(self.fig)) |
76 76 | if (os.path.exists(self.msNoWeatherfile)): |
77 77 | shutil.rmtree(self.msNoWeatherfile) |
78 78 | |
79 79 | def test3(self): |
80 80 | '''Test 3: Good input file and output exists''' |
81 81 | res = plotweather(vis=self.msfile, plotName=self.fig) |
82 82 | self.assertIsNotNone(res) |
83 83 | opac = res[0]/1e55 |
84 - | self.assertAlmostEqual(opac, 1.3867727940788754) |
84 + | self.assertAlmostEqual(opac, 1.3931958371884019) |
85 85 | self.assertTrue(os.path.exists(self.fig)) |
86 86 | |
87 87 | def test4(self): |
88 88 | '''Test 4: Good input file and no output plot exists''' |
89 89 | res = plotweather(vis=self.msfile, doPlot=False) |
90 90 | self.assertIsNotNone(res) |
91 91 | opac = res[0]/1e55 |
92 - | self.assertAlmostEqual(opac, 1.3867727940788754) |
92 + | self.assertAlmostEqual(opac, 1.3931958371884019) |
93 93 | defaultFig = self.msfile + ".plotweather.png" |
94 94 | self.assertFalse(os.path.exists(defaultFig)) |
95 95 | |
96 96 | def test5(self): |
97 97 | '''Test 5: seasonal_weight''' |
98 98 | res = plotweather(vis=self.msfile, seasonal_weight=0.75, plotName=self.fig) |
99 99 | self.assertIsNotNone(res) |
100 100 | opac = res[0]/1e54 |
101 - | self.assertAlmostEqual(opac, 6.9338639703943761) |
101 + | self.assertAlmostEqual(opac, 6.9659791859420084) |
102 102 | self.assertTrue(os.path.exists(self.fig)) |
103 103 | |
104 104 | def test6(self): |
105 105 | '''Test 6: pdf output format''' |
106 106 | plot = '/tmp/plotweathertest.pdf' |
107 107 | opac = plotweather(vis=self.msfile, plotName=plot) |
108 108 | self.assertTrue(os.path.exists(plot)) |
109 109 | os.remove(plot) |
110 110 | |
111 111 | def test7(self): |