Skip to content

Commit

Permalink
Merge pull request #149 from Colin-b/check_prs
Browse files Browse the repository at this point in the history
Drop pytest 7 support
  • Loading branch information
Colin-b authored Sep 19, 2024
2 parents 042e9c3 + 1d135ad commit a153d86
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
pytest-major-version: ['7', '8']

steps:
- uses: actions/checkout@v4
Expand All @@ -21,7 +20,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]
python -m pip install pytest~=${{ matrix.pytest-major-version }}.0
- name: Test
run: |
pytest --cov=pytest_httpx --cov-fail-under=100 --cov-report=term-missing --runpytest=subprocess
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.8.0
hooks:
- id: black
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Removed
- `pytest` `7` is not supported anymore (`pytest` `8` has been out for 9 months already).

## [0.30.0] - 2024-02-21
### Changed
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ classifiers = [
]
dependencies = [
"httpx==0.27.*",
"pytest>=7,<9",
"pytest==8.*",
]
dynamic = ["version"]

Expand All @@ -50,9 +50,9 @@ issues = "https://github.com/Colin-b/pytest_httpx/issues"
[project.optional-dependencies]
testing = [
# Used to check coverage
"pytest-cov==4.*",
"pytest-cov==5.*",
# Used to run async tests
"pytest-asyncio==0.23.*",
"pytest-asyncio==0.24.*",
]

[project.entry-points.pytest11]
Expand Down
10 changes: 5 additions & 5 deletions pytest_httpx/_pretty_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def __init__(

headers_encoding = request.headers.encoding
self.expected_headers = {
# httpx uses lower cased header names as internal key
header.lower().encode(headers_encoding)
for matcher in matchers
if matcher.headers
for header in matcher.headers
# httpx uses lower cased header names as internal key
header.lower().encode(headers_encoding)
for matcher in matchers
if matcher.headers
for header in matcher.headers
}
self.expect_body = any(
[
Expand Down

0 comments on commit a153d86

Please sign in to comment.