mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
removing duplicate test
This commit is contained in:
parent
d45b835ea2
commit
c5a2b38914
@ -188,49 +188,6 @@ def test_class_list_properties(capsys: CaptureFixture) -> None:
|
|||||||
assert actual_output == expected_output
|
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:
|
def test_subclass_properties(capsys: CaptureFixture) -> None:
|
||||||
class SubClass(DataService):
|
class SubClass(DataService):
|
||||||
name = "Hello"
|
name = "Hello"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user