NAPALM's NetworkDriver.__del__ calls is_alive(), so every driver instance in tests/test_zyxel.py that is garbage-collected without having been closed (e.g. the one built at line 486) connects to 192.168.1.1:80 — against the standard's "tests never open a socket". Profiling a test run shows base.py:95(__del__) → socket.connect. Same cause as NAPALM/napalm-fritzbox#11.
Expected
The tests close every driver they build (or patch socket.create_connection for the module); a session-wide no-socket guard in tests/conftest.py (as fritzbox#11 added) keeps it that way.
## What happens
`ZyxelVMGDriver.is_alive()` (`napalm_zyxel/zyxel_driver.py:212`) opens a real TCP connection:
```python
sock = socket.create_connection((self.hostname, self.port), timeout=5)
```
NAPALM's `NetworkDriver.__del__` calls `is_alive()`, so every driver instance in `tests/test_zyxel.py` that is garbage-collected without having been closed (e.g. the one built at line 486) connects to 192.168.1.1:80 — against the standard's "tests never open a socket". Profiling a test run shows `base.py:95(__del__)` → `socket.connect`. Same cause as NAPALM/napalm-fritzbox#11.
## Expected
The tests close every driver they build (or patch `socket.create_connection` for the module); a session-wide no-socket guard in `tests/conftest.py` (as fritzbox#11 added) keeps it that way.
Priority: P4 — non-hermetic unit tests.
Found during the bug sweep of 2026-11-02 (#15).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
ZyxelVMGDriver.is_alive()(napalm_zyxel/zyxel_driver.py:212) opens a real TCP connection:NAPALM's
NetworkDriver.__del__callsis_alive(), so every driver instance intests/test_zyxel.pythat is garbage-collected without having been closed (e.g. the one built at line 486) connects to 192.168.1.1:80 — against the standard's "tests never open a socket". Profiling a test run showsbase.py:95(__del__)→socket.connect. Same cause as NAPALM/napalm-fritzbox#11.Expected
The tests close every driver they build (or patch
socket.create_connectionfor the module); a session-wide no-socket guard intests/conftest.py(as fritzbox#11 added) keeps it that way.Priority: P4 — non-hermetic unit tests.
Found during the bug sweep of 2026-11-02 (#15).