test: Configuration errors in config.rsc

This commit is contained in:
2024-10-28 13:52:16 +01:00
parent 1e331feb2f
commit 442071c212
4 changed files with 1622 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
"""Test errors in config.rsc"""
__author__ = "Sven Sager"
__copyright__ = "Copyright (C) 2024 Sven Sager"
__license__ = "GPLv2"
from os.path import dirname
from tests import TestRevPiModIO
class TestConfigRscBugs(TestRevPiModIO):
data_dir = dirname(__file__)
def test_overlapping(self):
with self.assertWarnsRegex(Warning, r"RelayOutputPadding_[1-4]"):
self.modio(configrsc="config_overlapping_bits.rsc")
with self.assertWarnsRegex(Warning, r"RelayCycleWarningThreshold_4"):
self.modio(configrsc="config_overlapping_bytes.rsc")
def test_floating_offsets(self):
with self.assertWarnsRegex(Warning, r"Offset value 31.5"):
self.modio(configrsc="config_floating_offset.rsc")