PyPlumIO 0.5.26__tar.gz → 0.5.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.pre-commit-config.yaml +2 -2
- {pyplumio-0.5.26 → pyplumio-0.5.28}/PKG-INFO +2 -2
- {pyplumio-0.5.26 → pyplumio-0.5.28}/PyPlumIO.egg-info/PKG-INFO +2 -2
- {pyplumio-0.5.26 → pyplumio-0.5.28}/PyPlumIO.egg-info/requires.txt +1 -1
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/_version.py +2 -2
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/const.py +47 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/event_manager.py +1 -1
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyproject.toml +1 -1
- {pyplumio-0.5.26 → pyplumio-0.5.28}/requirements_test.txt +1 -1
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_event_manager.py +12 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_protocol.py +1 -1
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.gitattributes +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/CODE_OF_CONDUCT.md +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/dependabot.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/workflows/ci.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/workflows/codeql-analysis.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/workflows/deploy.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.github/workflows/documentation.yml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.gitignore +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/.vscode/settings.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/LICENSE +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/MANIFEST.in +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/PyPlumIO.egg-info/SOURCES.txt +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/PyPlumIO.egg-info/dependency_links.txt +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/PyPlumIO.egg-info/top_level.txt +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/README.md +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/Makefile +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/make.bat +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/callbacks.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/conf.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/connecting.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/frames.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/index.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/mixers_thermostats.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/protocol.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/reading.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/schedules.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/docs/source/writing.rst +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/images/ecomax.png +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/images/rs485.png +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/__main__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/connection.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/devices/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/devices/ecomax.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/devices/ecoster.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/devices/mixer.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/devices/thermostat.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/exceptions.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/filters.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/frames/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/frames/messages.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/frames/requests.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/frames/responses.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/data_types.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/factory.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/parameter.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/schedule.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/task_manager.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/timeout.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/helpers/uid.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/protocol.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/py.typed +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/stream.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/alerts.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/boiler_load.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/boiler_power.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/ecomax_parameters.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/fan_power.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/frame_versions.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/fuel_consumption.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/fuel_level.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/lambda_sensor.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/mixer_parameters.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/mixer_sensors.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/modules.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/network_info.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/output_flags.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/outputs.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/pending_alerts.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/product_info.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/program_version.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/regulator_data.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/regulator_data_schema.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/schedules.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/statuses.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/temperatures.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/thermostat_parameters.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/structures/thermostat_sensors.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/pyplumio/utils.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/requirements.txt +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/requirements_docs.txt +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/setup.cfg +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/conftest.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/frames/test_init.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/frames/test_messages.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/frames/test_requests.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/frames/test_responses.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/__init__.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_data_types.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_factory.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_parameter.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_schedule.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_task_manager.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_timeout.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/helpers/test_uid.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/ruff.toml +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_connection.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_devices.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_filters.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_init.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_main.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_stream.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/test_utils.py +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/messages/regulator_data.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/messages/sensor_data.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/alerts.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/ecomax_control.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/ecomax_parameters.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/mixer_parameters.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/set_ecomax_parameter.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/set_mixer_parameter.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/set_schedule.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/set_thermostat_parameter.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/requests/thermostat_parameters.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/alerts.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/device_available.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/ecomax_parameters.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/mixer_parameters.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/password.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/program_version.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/regulator_data_schema.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/schedules.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/thermostat_parameters.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/responses/uid.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/unknown/unknown_ecomax_parameter.json +0 -0
- {pyplumio-0.5.26 → pyplumio-0.5.28}/tests/testdata/unknown/unknown_mixer_parameter.json +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
# See https://pre-commit.com/hooks.html for more hooks
|
3
3
|
repos:
|
4
4
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
5
|
-
rev: v0.
|
5
|
+
rev: v0.6.3
|
6
6
|
hooks:
|
7
7
|
- id: ruff
|
8
8
|
args:
|
@@ -12,6 +12,6 @@ repos:
|
|
12
12
|
hooks:
|
13
13
|
- id: codespell
|
14
14
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
15
|
-
rev: v1.11.
|
15
|
+
rev: v1.11.2
|
16
16
|
hooks:
|
17
17
|
- id: mypy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyPlumIO
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.28
|
4
4
|
Summary: PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
|
5
5
|
Author-email: Denis Paavilainen <denpa@denpa.pro>
|
6
6
|
License: MIT License
|
@@ -32,7 +32,7 @@ Requires-Dist: mypy==1.11.2; extra == "test"
|
|
32
32
|
Requires-Dist: pyserial-asyncio-fast==0.14; extra == "test"
|
33
33
|
Requires-Dist: pytest==8.3.2; extra == "test"
|
34
34
|
Requires-Dist: pytest-asyncio==0.24.0; extra == "test"
|
35
|
-
Requires-Dist: ruff==0.
|
35
|
+
Requires-Dist: ruff==0.6.3; extra == "test"
|
36
36
|
Requires-Dist: tox==4.18.0; extra == "test"
|
37
37
|
Requires-Dist: types-pyserial==3.5.0.20240826; extra == "test"
|
38
38
|
Provides-Extra: docs
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyPlumIO
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.28
|
4
4
|
Summary: PyPlumIO is a native ecoNET library for Plum ecoMAX controllers.
|
5
5
|
Author-email: Denis Paavilainen <denpa@denpa.pro>
|
6
6
|
License: MIT License
|
@@ -32,7 +32,7 @@ Requires-Dist: mypy==1.11.2; extra == "test"
|
|
32
32
|
Requires-Dist: pyserial-asyncio-fast==0.14; extra == "test"
|
33
33
|
Requires-Dist: pytest==8.3.2; extra == "test"
|
34
34
|
Requires-Dist: pytest-asyncio==0.24.0; extra == "test"
|
35
|
-
Requires-Dist: ruff==0.
|
35
|
+
Requires-Dist: ruff==0.6.3; extra == "test"
|
36
36
|
Requires-Dist: tox==4.18.0; extra == "test"
|
37
37
|
Requires-Dist: types-pyserial==3.5.0.20240826; extra == "test"
|
38
38
|
Provides-Extra: docs
|
@@ -106,7 +106,54 @@ class AlertType(IntEnum):
|
|
106
106
|
MAX_EXHAUST_TEMP_EXCEEDED = 6
|
107
107
|
KINDLING_FAILURE = 7
|
108
108
|
NO_FUEL = 8
|
109
|
+
LEAK_DETECTED = 9
|
110
|
+
PRESSURE_SENSOR_FAILURE = 10
|
109
111
|
FAN_FAILURE = 11
|
112
|
+
INSUFFICIENT_AIR_PRESSURE = 12
|
113
|
+
BURN_OFF_FAILURE = 13
|
114
|
+
FLAME_SENSOR_FAILURE = 14
|
115
|
+
LINEAR_ACTUATOR_BLOCKED = 15
|
116
|
+
INCORRECT_PARAMETERS = 16
|
117
|
+
CONDENSATION_WARNING = 17
|
118
|
+
BOILER_STB_TRIPPED = 18
|
119
|
+
FEEDER_STB_TRIPPED = 19
|
120
|
+
MIN_WATER_PRESSURE_EXCEEDED = 20
|
121
|
+
MAX_WATER_PRESSURE_EXCEEDED = 21
|
122
|
+
FEEDER_JAMMED = 22
|
123
|
+
FLAMEOUT = 23
|
124
|
+
EXHAUST_FAN_FAILURE = 24
|
125
|
+
EXTERNAL_FEEDER_FAILURE = 25
|
126
|
+
SOLAR_COLLECTOR_TEMP_SENSOR_FAILURE = 26
|
127
|
+
SOLAR_CIRCUIT_TEMP_SENSOR_FAILURE = 27
|
128
|
+
H1_CIRCUIT_TEMP_SENSOR_FAILURE = 28
|
129
|
+
H2_CIRCUIT_TEMP_SENSOR_FAILURE = 29
|
130
|
+
H3_CIRCUIT_TEMP_SENSOR_FAILURE = 30
|
131
|
+
OUTDOOR_TEMP_SENSOR_FAILURE = 31
|
132
|
+
WATER_HEATER_TEMP_SENSOR_FAILURE = 32
|
133
|
+
H0_CIRCUIT_TEMP_SENSOR_FAILURE = 33
|
134
|
+
FROST_PROTECTION_RUNNING_WO_HS = 34
|
135
|
+
FROST_PROTECTION_RUNNING_W_HS = 35
|
136
|
+
MAX_SOLAR_COLLECTOR_TEMP_EXCEEDED = 36
|
137
|
+
MAX_HEATED_FLOOR_TEMP_EXCEEDED = 37
|
138
|
+
BOILER_COOLING_RUNNING = 38
|
139
|
+
ECOLAMBDA_CONNECTION_FAILURE = 39
|
140
|
+
PRIMARY_AIR_THROTTLE_JAMMED = 40
|
141
|
+
SECONDARY_AIR_THROTTLE_JAMMED = 41
|
142
|
+
FEEDER_OVERFLOW = 42
|
143
|
+
FURNANCE_OVERFLOW = 43
|
144
|
+
MODULE_B_CONNECTION_FAILURE = 44
|
145
|
+
CLEANING_ACTUATOR_FAILURE = 45
|
146
|
+
MIN_PRESSURE_EXCEEDED = 46
|
147
|
+
MAX_PRESSURE_EXCEEDED = 47
|
148
|
+
PRESSURE_SENSOR_DAMAGED = 48
|
149
|
+
MAX_MAIN_HS_TEMP_EXCEEDED = 49
|
150
|
+
MAX_ADDITIONAL_HS_TEMP_EXCEEDED = 50
|
151
|
+
SOLAR_PANEL_OFFLINE = 51
|
152
|
+
FEEDER_CONTROL_FAILURE = 52
|
153
|
+
FEEDER_BLOCKED = 53
|
154
|
+
MAX_THERMOCOPLE_TEMP_EXCEEDED = 54
|
155
|
+
THERMOCOUPLE_WIRING_FAILURE = 55
|
156
|
+
UNKNOWN_ERROR = 255
|
110
157
|
|
111
158
|
|
112
159
|
@unique
|
@@ -150,7 +150,7 @@ class EventManager(TaskManager, Generic[T]):
|
|
150
150
|
async def dispatch(self, name: str, value: T) -> None:
|
151
151
|
"""Call registered callbacks and dispatch the event."""
|
152
152
|
if callbacks := self._callbacks.get(name, None):
|
153
|
-
for callback in callbacks:
|
153
|
+
for callback in list(callbacks):
|
154
154
|
if (result := await callback(value)) is not None:
|
155
155
|
value = result
|
156
156
|
|
@@ -107,6 +107,18 @@ async def test_subscribe_once(event_manager: EventManager) -> None:
|
|
107
107
|
callback.assert_not_awaited()
|
108
108
|
|
109
109
|
|
110
|
+
async def test_subscribe_once_interrupt(event_manager: EventManager) -> None:
|
111
|
+
"""Test subscribing once doesn't affect other callbacks."""
|
112
|
+
callback1 = AsyncMock(return_value=None)
|
113
|
+
callback2 = AsyncMock(return_value=None)
|
114
|
+
event_manager.subscribe_once("test_key1", callback1)
|
115
|
+
assert event_manager.subscribe("test_key1", callback2) is callback2
|
116
|
+
event_manager.dispatch_nowait("test_key1", "test_value1")
|
117
|
+
event_manager.dispatch_nowait("test_key1", "test_value2")
|
118
|
+
await event_manager.wait_until_done()
|
119
|
+
callback2.assert_has_awaits([call("test_value1"), call("test_value2")])
|
120
|
+
|
121
|
+
|
110
122
|
async def test_unsubscribe(event_manager: EventManager) -> None:
|
111
123
|
"""Test unsubscribing from the event."""
|
112
124
|
callback = AsyncMock(return_value=True)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|