Skip to content

Fixed getaddrinfo tests failing #911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ jobs:
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: pip install -e .[test]
- name: Patch /etc/hosts
if: runner.os != 'Windows'
run: |
echo "1.2.3.4 xn--fa-hia.de" | sudo tee -a /etc/hosts
echo "5.6.7.8 fass.de" | sudo tee -a /etc/hosts
- name: Patch C:\Windows\System32\drivers\etc\hosts
if: runner.os == 'Windows'
run: |
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "1.2.3.4 xn--fa-hia.de"
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "5.6.7.8 fass.de"
Comment on lines +102 to +103
Copy link
Preview

Copilot AI Apr 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider checking if the entry '1.2.3.4 xn--fa-hia.de' is already present in the Windows hosts file before appending to prevent duplicate entries on repeated runs.

Suggested change
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "1.2.3.4 xn--fa-hia.de"
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "5.6.7.8 fass.de"
if (-not (Select-String -Path C:\Windows\System32\drivers\etc\hosts -Pattern "1.2.3.4 xn--fa-hia.de")) {
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "1.2.3.4 xn--fa-hia.de"
}
if (-not (Select-String -Path C:\Windows\System32\drivers\etc\hosts -Pattern "5.6.7.8 fass.de")) {
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "5.6.7.8 fass.de"
}

Copilot uses AI. Check for mistakes.

- name: Test with pytest
run: coverage run -m pytest -v
timeout-minutes: 5
Expand Down