Skip to content

Commit df83cf4

Browse files
Merge pull request #289 from neutrinoceros/support_oo
TST: add support for Python's optimized mode
2 parents 8e10dda + 9ac29eb commit df83cf4

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

.github/workflows/ci.yml

+20
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,26 @@ jobs:
152152
- name: Run mypy
153153
run: uv run mypy src/inifix
154154

155+
optimized_python:
156+
runs-on: ubuntu-latest
157+
name: optimized Python
158+
159+
concurrency:
160+
group: ${{ github.workflow }}-${{ github.ref }}-optimized
161+
cancel-in-progress: true
162+
163+
steps:
164+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
165+
with:
166+
fetch-depth: 0
167+
168+
- uses: astral-sh/setup-uv@d8db0a86d3d88f3017a4e6b8a1e2b234e7a0a1b5 # v4.0.0
169+
- name: Build
170+
run: uv sync -p 3.13 --group test --no-editable
171+
- name: Run pytest with PYTHONOPTIMIZE=2
172+
run: uv run --no-project pytest --color=yes --doctest-modules
173+
env:
174+
PYTHONOPTIMIZE: 2
155175

156176
check-readme:
157177
runs-on: ubuntu-latest

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
9+
- TST: add support for Python's optimized mode
10+
711
## [5.0.3] - 2024-10-25
812

913
- TST: validate inifix's pre-commit hooks continuously

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,6 @@ ignore_errors = true
111111
minversion = "6.0"
112112
filterwarnings = [
113113
"error",
114+
"ignore:assertions not in test modules or plugins will be ignored:UserWarning",
114115
]
115116
addopts = "-ra"

0 commit comments

Comments
 (0)