diff --git a/tests/common/__init__.py b/tests/common/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/common/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/common/test_config_rsc_bugs.py b/tests/common/test_config_rsc_bugs.py index 7d6337a..460b7e4 100644 --- a/tests/common/test_config_rsc_bugs.py +++ b/tests/common/test_config_rsc_bugs.py @@ -6,7 +6,7 @@ __license__ = "GPLv2" from os.path import dirname -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestConfigRscBugs(TestRevPiModIO): diff --git a/tests/common/test_devices.py b/tests/common/test_devices.py index 9bcccc9..166351a 100644 --- a/tests/common/test_devices.py +++ b/tests/common/test_devices.py @@ -8,7 +8,7 @@ from os.path import dirname from revpimodio2 import OUT, MEM, INP from revpimodio2.device import Virtual, Base -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestDevicesModule(TestRevPiModIO): diff --git a/tests/common/test_init_modio.py b/tests/common/test_init_modio.py index a88a6d1..aac5725 100644 --- a/tests/common/test_init_modio.py +++ b/tests/common/test_init_modio.py @@ -9,7 +9,7 @@ from os.path import join, dirname from shutil import copyfile import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestInitModio(TestRevPiModIO): diff --git a/tests/common/test_modio_class_basics.py b/tests/common/test_modio_class_basics.py index bbe9811..606d2fa 100644 --- a/tests/common/test_modio_class_basics.py +++ b/tests/common/test_modio_class_basics.py @@ -9,7 +9,7 @@ from os.path import join, dirname from signal import SIGINT from threading import Event -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestModioClassBasics(TestRevPiModIO): diff --git a/tests/compact/__init__.py b/tests/compact/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/compact/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/compact/test_compact.py b/tests/compact/test_compact.py index 395e440..c2d71cf 100644 --- a/tests/compact/test_compact.py +++ b/tests/compact/test_compact.py @@ -4,10 +4,10 @@ __author__ = "Sven Sager" __copyright__ = "Copyright (C) 2024 Sven Sager" __license__ = "GPLv2" -from os.path import join, dirname +from os.path import dirname import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestCompact(TestRevPiModIO): diff --git a/tests/cycleloop/__init__.py b/tests/cycleloop/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/cycleloop/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/cycleloop/test_cycleloop.py b/tests/cycleloop/test_cycleloop.py index 13fd3d0..b2d9d63 100644 --- a/tests/cycleloop/test_cycleloop.py +++ b/tests/cycleloop/test_cycleloop.py @@ -8,8 +8,8 @@ from os.path import dirname, join from time import sleep import revpimodio2 -from tests import TestRevPiModIO -from tests.helper import ExitThread +from .. import TestRevPiModIO +from ..helper import ExitThread event_data = (None, None) diff --git a/tests/events_and_signals/__init__.py b/tests/events_and_signals/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/events_and_signals/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/events_and_signals/test_events.py b/tests/events_and_signals/test_events.py index f1dc009..875a05f 100644 --- a/tests/events_and_signals/test_events.py +++ b/tests/events_and_signals/test_events.py @@ -9,8 +9,8 @@ from threading import Event from time import sleep from revpimodio2 import RISING, FALLING -from tests import TestRevPiModIO -from tests.helper import ChangeThread +from .. import TestRevPiModIO +from ..helper import ChangeThread event_data = (None, None) diff --git a/tests/events_and_signals/test_signals.py b/tests/events_and_signals/test_signals.py index 802897b..6814256 100644 --- a/tests/events_and_signals/test_signals.py +++ b/tests/events_and_signals/test_signals.py @@ -6,8 +6,8 @@ __license__ = "GPLv2" from os.path import dirname -from tests import TestRevPiModIO -from tests.helper import ExitSignal +from .. import TestRevPiModIO +from ..helper import ExitSignal class TestSignals(TestRevPiModIO): diff --git a/tests/flat/__init__.py b/tests/flat/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/flat/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/flat/test_flat.py b/tests/flat/test_flat.py index 98e8472..b8c938b 100644 --- a/tests/flat/test_flat.py +++ b/tests/flat/test_flat.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestFlat(TestRevPiModIO): diff --git a/tests/io_tests/__init__.py b/tests/io_tests/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/io_tests/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/io_tests/test_io_functions.py b/tests/io_tests/test_io_functions.py index 38e96fb..4743489 100644 --- a/tests/io_tests/test_io_functions.py +++ b/tests/io_tests/test_io_functions.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname from revpimodio2 import OUT -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestIoFunctions(TestRevPiModIO): diff --git a/tests/io_tests/test_ios.py b/tests/io_tests/test_ios.py index 83c6b73..e4a0666 100644 --- a/tests/io_tests/test_ios.py +++ b/tests/io_tests/test_ios.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname from revpimodio2.io import IntIOCounter -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestIos(TestRevPiModIO): diff --git a/tests/mainloop/__init__.py b/tests/mainloop/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/mainloop/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/mainloop/test_mainloop.py b/tests/mainloop/test_mainloop.py index 23b604c..16aaa22 100644 --- a/tests/mainloop/test_mainloop.py +++ b/tests/mainloop/test_mainloop.py @@ -8,8 +8,8 @@ from os.path import dirname from time import sleep import revpimodio2 -from tests import TestRevPiModIO -from tests.helper import ExitThread, ChangeThread +from .. import TestRevPiModIO +from ..helper import ExitThread, ChangeThread event_data = (None, None) diff --git a/tests/replace_io/__init__.py b/tests/replace_io/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/replace_io/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/replace_io/test_replace_io.py b/tests/replace_io/test_replace_io.py index 0b7ca65..2451e41 100644 --- a/tests/replace_io/test_replace_io.py +++ b/tests/replace_io/test_replace_io.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import join, dirname from revpimodio2.io import IntIOReplaceable -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestReplaceIO(TestRevPiModIO): @@ -148,20 +148,16 @@ class TestReplaceIO(TestRevPiModIO): def test_replace_io_file_fail(self): with self.assertRaises(RuntimeError): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_fail.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_fail.conf")) with self.assertRaises(RuntimeError): - rpi = self.modio(replace_io_file="no_file_nonono") + self.modio(replace_io_file="no_file_nonono") with self.assertRaises(RuntimeError): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_failformat.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_failformat.conf")) with self.assertRaises(ValueError): - rpi = self.modio( - replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_bool.conf") - ) + self.modio(replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_bool.conf")) with self.assertRaises(ValueError): - rpi = self.modio( - replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_int.conf") - ) + self.modio(replace_io_file=join(self.data_dir, "replace_io_faildefaultvalue_int.conf")) with self.assertRaises(ValueError): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_failbit_int.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_failbit_int.conf")) with self.assertRaisesRegex(ValueError, r"defaultvalue to bytes"): - rpi = self.modio(replace_io_file=join(self.data_dir, "replace_io_bytes_fail.conf")) + self.modio(replace_io_file=join(self.data_dir, "replace_io_bytes_fail.conf")) diff --git a/tests/revpi3/__init__.py b/tests/revpi3/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/revpi3/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/revpi3/test_connect.py b/tests/revpi3/test_connect.py index d269e1c..23beeec 100644 --- a/tests/revpi3/test_connect.py +++ b/tests/revpi3/test_connect.py @@ -7,7 +7,7 @@ __license__ = "GPLv2" from os.path import dirname from revpimodio2 import BLUE -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestRevPiConnect(TestRevPiModIO): diff --git a/tests/revpi3/test_core.py b/tests/revpi3/test_core.py index c8106ec..fbda827 100644 --- a/tests/revpi3/test_core.py +++ b/tests/revpi3/test_core.py @@ -8,7 +8,7 @@ from os.path import dirname from revpimodio2 import RED, GREEN, OFF, BLUE from revpimodio2.io import IOBase, IntIO -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestRevPiCore(TestRevPiModIO): diff --git a/tests/revpi4/__init__.py b/tests/revpi4/__init__.py new file mode 100644 index 0000000..2dc037f --- /dev/null +++ b/tests/revpi4/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +"""Init file for test group.""" +__author__ = "Sven Sager" +__copyright__ = "Copyright (C) 2024 Sven Sager" +__license__ = "GPLv2" diff --git a/tests/revpi4/test_connect4.py b/tests/revpi4/test_connect4.py index a88b2e7..8f0918c 100644 --- a/tests/revpi4/test_connect4.py +++ b/tests/revpi4/test_connect4.py @@ -4,10 +4,10 @@ __author__ = "Sven Sager" __copyright__ = "Copyright (C) 2024 Sven Sager" __license__ = "GPLv2" -from os.path import join, dirname +from os.path import dirname import revpimodio2 -from tests import TestRevPiModIO +from .. import TestRevPiModIO class TestRevPi4(TestRevPiModIO):