Skip to content
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

fix(test_static.py): fix Windows CPython 3.13 build #2346

Merged
merged 5 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/cibuildwheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.20.0
uses: pypa/cibuildwheel@v2.21.1
env:
CIBW_ARCHS_LINUX: all
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform.name }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run tests (GNU Mailman 3)
# Test that the current dev branch does not break GNU Mailman 3.
name: test-mailman

on:
# Trigger the workflow on master but also allow it to run manually.
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Test various architectures by building out binaries with cibuildwheel.
name: test-wheels

on:
# Trigger the workflow on master but also allow it to run manually.
workflow_dispatch:
push:
branches:
- master

jobs:
test-emulated:
name: "cibuildwheel: ${{ matrix.platform.build }}"
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- build: "cp313-manylinux_aarch64"
os: ubuntu-latest
emulation: true
- build: "cp313-manylinux_s390x"
os: ubuntu-latest
emulation: true
- build: "cp313-musllinux_x86_64"
os: ubuntu-latest
- build: "cp313-macosx_arm64"
os: macos-14
- build: "cp313-win_amd64"
os: windows-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.platform.emulation }}
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: all
CIBW_BUILD: ${{ matrix.platform.build }}
36 changes: 0 additions & 36 deletions .github/workflows/tests-emulated.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions tests/test_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,11 @@ def test_file_closed(client, patch_open):
assert patch_open.current_file.closed


def test_options_request(util, asgi, patch_open):
def test_options_request(client, patch_open):
patch_open()
app = util.create_app(asgi, cors_enable=True)
app.add_static_route('/static', '/var/www/statics')
client = testing.TestClient(app)

client.app.add_middleware(falcon.CORSMiddleware())
client.app.add_static_route('/static', '/var/www/statics')

resp = client.simulate_options(
path='/static/foo/bar.txt',
Expand Down