Skip to content

Restructure tests to pytest with device XML fixtures#50

Merged
flyte merged 14 commits intodevelopfrom
test-restructure
Apr 7, 2026
Merged

Restructure tests to pytest with device XML fixtures#50
flyte merged 14 commits intodevelopfrom
test-restructure

Conversation

@flyte
Copy link
Copy Markdown
Owner

@flyte flyte commented Apr 7, 2026

Summary

  • Convert all tests from unittest to pytest style
  • Split monolithic test_upnpclient.py into test_device.py, test_discovery.py, test_marshal.py, test_soap.py, test_errors.py
  • Add conftest.py with session-scoped HTTP server and per-device fixtures
  • Add XML fixtures for 5 device types: IGD router, Marantz SR5008 (malformed namespace), generic DLNA MediaRenderer, Chromecast (404-prone), Roku (missing SCPD)
  • 94 tests (up from 75), all passing on Python 3.9-3.13

Test plan

  • 94 tests pass across all new test files
  • tox passes on Python 3.9-3.13
  • Ruff lint clean
  • Coverage >= 80%

🤖 Generated with Claude Code

flyte and others added 14 commits April 7, 2026 17:59
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix IGD XML templates to use /igd/ SCPD paths matching the new directory
structure, and convert all device-related tests from unittest to pytest.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@flyte flyte merged commit 45ca5ea into develop Apr 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant