Skip to content

Commit a6b3077

Browse files
authored
Merge pull request #42 from homeassistant-projects/test-fixes
Attempting to fix workflows and unit tests
2 parents 0c354d2 + ac8d5cf commit a6b3077

File tree

12 files changed

+404
-1167
lines changed

12 files changed

+404
-1167
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525

2626
- name: Test with pytest
2727
run: |
28-
uv run --frozen pytest
28+
uv run --frozen pytest --isolate

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*.pyc
33
*.log
44
*.egg-info
5-
5+
.devcontainer
66
dist
77
build
88

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dev = [
3232
"pre-commit>=4.2.0",
3333
"pytest>=8.4.1",
3434
"pytest-asyncio>=1.0.0",
35+
"pytest-isolate>=0.0.12",
3536
"pytest-mock>=3.14.1",
3637
"ruff>=0.12.3",
3738
"twine>=6.1.0",

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# Modify sys.path to include the project root
2323
sys.path.insert(0, str(project_root))
24-
test_file_dir = project_root / "tests" / "data_files"
24+
test_file_dir = project_root / "data_files"
2525
# pylint: disable=wrong-import-position
2626
# ruff: noqa: E402
2727
# flake8: noqa: E402

tests/test_gateway.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -126,41 +126,6 @@ def test_set_gateway_attributes_sets_attributes_correctly():
126126
assert gateway.cellular_connection_signal_strength == 4.5
127127

128128

129-
# backoff object can be created with default values and current backoff interval can be retrieved
130-
def test_default_values2():
131-
"""
132-
Test that ADTPulseGateway object can be created with default values
133-
"""
134-
gateway = ADTPulseGateway()
135-
assert gateway.manufacturer == "Unknown"
136-
assert gateway._status_text == "OFFLINE"
137-
assert gateway.backoff.name == "Gateway"
138-
assert gateway.backoff.initial_backoff_interval == ADT_DEFAULT_POLL_INTERVAL
139-
assert (
140-
gateway.backoff._max_backoff_interval == ADT_GATEWAY_MAX_OFFLINE_POLL_INTERVAL
141-
)
142-
assert gateway.backoff.backoff_count == 0
143-
assert gateway.backoff.expiration_time == 0.0
144-
assert gateway.backoff._detailed_debug_logging is False
145-
assert gateway.backoff._threshold == 0
146-
assert gateway.model is None
147-
assert gateway.serial_number is None
148-
assert gateway.next_update == 0
149-
assert gateway.last_update == 0
150-
assert gateway.firmware_version is None
151-
assert gateway.hardware_version is None
152-
assert gateway.primary_connection_type is None
153-
assert gateway.broadband_connection_status is None
154-
assert gateway.cellular_connection_status is None
155-
assert gateway._cellular_connection_signal_strength == 0.0
156-
assert gateway.broadband_lan_ip_address is None
157-
assert gateway._broadband_lan_mac is None
158-
assert gateway.device_lan_ip_address is None
159-
assert gateway._device_lan_mac is None
160-
assert gateway.router_lan_ip_address is None
161-
assert gateway.router_wan_ip_address is None
162-
163-
164129
# backoff object can be incremented and reset correctly
165130
def test_backoff_increment_and_reset():
166131
"""

tests/test_paa_codium.py

Lines changed: 0 additions & 259 deletions
This file was deleted.

0 commit comments

Comments
 (0)