Skip to content
Snippets Groups Projects
Commit 550bcc58 authored by Martin Lange's avatar Martin Lange
Browse files

add test for input not accepting info

parent debd8b22
No related branches found
No related tags found
1 merge request!239Add test for input not accepting info
Pipeline #134728 passed with stages
in 7 minutes and 7 seconds
......@@ -457,6 +457,28 @@ class TestInput(unittest.TestCase):
with self.assertRaises(ValueError):
inp.set_source(outp)
def test_fail_accept(self):
t = datetime(2000, 1, 1)
info = Info(time=t, grid=NoGrid())
info2 = Info(time=t, grid=NoGrid(), units="m")
out = Output(name="Output", static=True)
in1 = Input(name="Input", static=True)
out >> in1
in1.ping()
out.push_info(info)
with self.assertRaises(FinamMetaDataError):
in1.exchange_info(info2)
in1.exchange_info(info)
with self.assertRaises(FinamMetaDataError):
in1.exchange_info(info)
def test_pull_static(self):
t = datetime(2000, 1, 1)
info = Info(time=t, grid=NoGrid())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment