From c5a2b389145beb89c3fde72a9526fe225624c280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Thu, 2 Nov 2023 17:50:43 +0100 Subject: [PATCH] removing duplicate test --- tests/test_properties.py | 43 ---------------------------------------- 1 file changed, 43 deletions(-) diff --git a/tests/test_properties.py b/tests/test_properties.py index 14af37b..873221f 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -188,49 +188,6 @@ def test_class_list_properties(capsys: CaptureFixture) -> None: assert actual_output == expected_output -def test_subclass_properties(capsys: CaptureFixture) -> None: - class SubClass(DataService): - name = "Hello" - _voltage = 10.0 - _current = 1.0 - - @property - def power(self) -> float: - return self._voltage * self.current - - @property - def voltage(self) -> float: - return self._voltage - - @voltage.setter - def voltage(self, value: float) -> None: - self._voltage = value - - @property - def current(self) -> float: - return self._current - - @current.setter - def current(self, value: float) -> None: - self._current = value - - class ServiceClass(DataService): - class_attr = SubClass() - - test_service = ServiceClass() - test_service.class_attr.voltage = 10.0 - - captured = capsys.readouterr() - expected_output = sorted( - [ - "ServiceClass.class_attr.voltage = 10.0", - "ServiceClass.class_attr.power = 10.0", - ] - ) - actual_output = sorted(captured.out.strip().split("\n")) - assert actual_output == expected_output - - def test_subclass_properties(capsys: CaptureFixture) -> None: class SubClass(DataService): name = "Hello"