Regression test for Issue #737.

This commit is contained in:
Tom Keffer
2022-02-07 16:23:48 -08:00
parent ed8b9f9223
commit 13ebe08cd6

View File

@@ -119,6 +119,15 @@ class StatsTest(unittest.TestCase):
# windGustDir should match the windDir seen at max wind:
self.assertEqual(accum_record['windGustDir'], windMaxDir)
def test_issue_737(self):
accum = weewx.accum.Accum(TimeSpan(start_ts, stop_ts))
for packet in self.dataset:
packet['windrun'] = None
accum.addRecord(packet)
# Extract the record out of the accumulator
record = accum.getRecord()
self.assertIsNone(record['windrun'])
class AccumTest(unittest.TestCase):