Skip to content

Commit f365442

Browse files
committed
wreq: stage README.md/Cargo.toml/LICENSE for tests that open them by path
multipart_test.py, request_test.py and response_test.py all build request bodies from these three repo-root files via a path relative to the repo root; CIBW_TEST_SOURCES only staged tests/, so every one of those tests hit a FileNotFoundError, surfaced as a DecodingError once that exception inside the async body-stream left httpbin nothing to respond with.
1 parent 86a800f commit f365442

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎.github/workflows/build-wreq.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ jobs:
9898
CARGO_BUILD_JOBS=2
9999
# Upstream's tests job serves httpbin on localhost:8080 as a service container.
100100
CIBW_TEST_REQUIRES: pytest pytest-asyncio pytest-rerunfailures httpbin
101-
CIBW_TEST_SOURCES: tests
101+
# multipart_test.py, request_test.py and response_test.py open README.md,
102+
# Cargo.toml and LICENSE by a path relative to the repo root (e.g.
103+
# Path("./README.md"), open("README.md")) to build request bodies; without
104+
# them staged in test_cwd every such test fails with a FileNotFoundError,
105+
# surfaced as a DecodingError once that exception inside the async
106+
# body-stream leaves httpbin nothing to respond with.
107+
CIBW_TEST_SOURCES: tests README.md Cargo.toml LICENSE
102108
CIBW_TEST_COMMAND: >-
103109
python -m httpbin.core --port 8080 > httpbin.log 2>&1 & HTTPBIN_PID=$!;
104110
python -c "import wreq.wreq as m; assert m.__file__.endswith('.so'), m.__file__" &&

0 commit comments

Comments
 (0)