Skip to content

Conversation

@mxschmitt
Copy link
Contributor

@mxschmitt mxschmitt commented Aug 4, 2025

example.com turns out to be behaving different in recent weeks - time to switch to our own server.

@mxschmitt mxschmitt force-pushed the test/do-not-depend-on-example.cpom branch from 9db3d47 to 93d7d30 Compare August 4, 2025 08:39
@mxschmitt mxschmitt requested a review from Copilot August 4, 2025 08:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the dependency on external domains (example.com and example.org) from tests by implementing a local test server. This improves test reliability by eliminating external network dependencies and ensures consistent test behavior regardless of internet connectivity.

  • Introduces a new TestServer class that provides local HTTP server functionality
  • Updates test cases to use the local test server instead of hardcoded external URLs
  • Replaces all references to example.com and example.org with dynamically generated localhost URLs

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/conftest.py Adds TestServer class implementation with HTTP server setup and pytest fixture
tests/test_sync.py Updates synchronous tests to use local test server instead of example.com
tests/test_asyncio.py Updates asynchronous tests to use local test server instead of example.com

@mxschmitt mxschmitt force-pushed the test/do-not-depend-on-example.cpom branch from 440ec7c to 331a08d Compare August 4, 2025 08:47
@mxschmitt mxschmitt merged commit 29e723f into main Aug 4, 2025
16 checks passed
@mxschmitt mxschmitt deleted the test/do-not-depend-on-example.cpom branch August 4, 2025 09:12
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.

3 participants