Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- package
- docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.13'
- name: Install prerequisites
run: python -m pip install tox
- name: Run ${{ matrix.env }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.13'
- name: Install prerequisites
run: python -m pip install build twine wheel
- name: Build package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- pypy-3.9
- pypy-3.10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install prerequisites
Expand Down
18 changes: 9 additions & 9 deletions tests/test_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def test_argv_context():
assert sys.argv == old

with ArgvContext(*new):
assert (
sys.argv == new
), "sys.argv wasn't correctly changed by the contextmanager"
assert sys.argv == new, (
"sys.argv wasn't correctly changed by the contextmanager"
)

assert sys.argv == old, "sys.argv wasn't correctly reset"

Expand All @@ -35,12 +35,12 @@ def test_environ_context():
assert os.getenv("FOO") is None, "Invalid test setup"

with EnvironContext(PATH=None, FOO="my foo value"):
assert (
os.getenv("PATH") is None
), "os.environ[PATH] wasn't removed by the contextmanager"
assert (
os.getenv("FOO") == "my foo value"
), "os.environ[FOO] wasn't set by the contextmanager"
assert os.getenv("PATH") is None, (
"os.environ[PATH] wasn't removed by the contextmanager"
)
assert os.getenv("FOO") == "my foo value", (
"os.environ[FOO] wasn't set by the contextmanager"
)

assert os.environ == old_environ, "object os.environ was not restored"
assert os.getenv("PATH") == old_path, "env var PATH was not restored"
Expand Down
Loading