test: Old core rap file without error limits

This commit is contained in:
2024-10-29 09:36:23 +01:00
parent 43d2b12413
commit 601d018eba
2 changed files with 17 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -91,3 +91,19 @@ class TestRevPiCore(TestRevPiModIO):
self.assertEqual(rpi.core.errorlimit2, 1100)
with self.assertRaises(ValueError):
rpi.core.errorlimit2 = 65999
def test_core_old_errorlimits(self):
"""Test non-existing error limits of first core rap file."""
with self.assertWarnsRegex(Warning, r"equal device name '.*' in pictory configuration."):
rpi = self.modio(configrsc="config_old.rsc")
# Errorlimits testen, die es nicht gibt (damals None, jetzt -1)
self.assertEqual(rpi.core.errorlimit1, -1)
self.assertEqual(rpi.core.errorlimit2, -1)
with self.assertRaises(RuntimeError):
rpi.core.errorlimit1 = 100
with self.assertRaises(RuntimeError):
rpi.core.errorlimit2 = 100
del rpi