File tree Expand file tree Collapse file tree 4 files changed +31
-9
lines changed
Expand file tree Collapse file tree 4 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 6262 run : uv pip install --system .
6363 - name : Run tests on ${{ matrix.os }}
6464 run : nox --session "tests-${{ matrix.python-version }}" -- --full-trace
65+ - name : Run min-version tests on ${{ matrix.os }}
66+ run : nox --session "tests-${{ matrix.python-version }}" -- --full-trace
6567 - name : Run Conda tests
6668 if : matrix.python-version == '3.12'
6769 run : nox --session "conda_tests" -- --full-trace
Original file line number Diff line number Diff line change @@ -67,7 +67,17 @@ def tests(session: nox.Session) -> None:
6767 con .execute ("DELETE FROM file WHERE SUBSTR(path, 2, 1) == ':'" )
6868
6969
70- @nox .session (venv_backend = "conda" , default = shutil .which ("conda" ))
70+ @nox .session (venv_backend = "uv" , default = False )
71+ def minimums (session : nox .Session ) -> None :
72+ """Run test suite with the lowest supported versions of everything. Requires uv."""
73+ session .create_tmp ()
74+
75+ session .install ("-e." , "--group=test" , "--resolution=lowest-direct" )
76+ session .run ("uv" , "pip" , "list" )
77+ session .run ("pytest" , * session .posargs )
78+
79+
80+ @nox .session (venv_backend = "conda" , default = bool (shutil .which ("conda" )))
7181def conda_tests (session : nox .Session ) -> None :
7282 """Run test suite set up with conda."""
7383 session .conda_install (
Original file line number Diff line number Diff line change @@ -39,12 +39,14 @@ classifiers = [
3939]
4040dependencies = [
4141 " argcomplete>=1.9.4,<4" ,
42- " attrs>=23 .1" ,
42+ " attrs>=24 .1" ,
4343 " colorlog>=2.6.1,<7" ,
4444 " dependency-groups>=1.1" ,
45- " packaging>=20.9" ,
46- " tomli>=1; python_version<'3.11'" ,
47- " virtualenv>=20.14.1" ,
45+ " packaging>=20.9; python_version<'3.10'" ,
46+ " packaging>=21; python_version>='3.10'" ,
47+ " tomli>=1.1; python_version<'3.11'" ,
48+ " virtualenv>=20.14.1; python_version<'3.10'" ,
49+ " virtualenv>=20.15; python_version>='3.10'" ,
4850]
4951optional-dependencies.tox_to_nox = [
5052 " importlib-resources; python_version<'3.9'" ,
@@ -68,8 +70,9 @@ dev = [
6870]
6971test = [
7072 " coverage[toml]>=7.2" ,
71- " pytest>=6" ,
72- " pytest-cov" ,
73+ " pytest>=7.4; python_version>='3.12'" ,
74+ " pytest>=7; python_version<'3.12'" ,
75+ " pytest-cov>=3" ,
7376]
7477docs = [
7578 " myst-parser" ,
Original file line number Diff line number Diff line change @@ -1015,9 +1015,16 @@ def test_inner_functions_reusing_venv(
10151015 venv , location = make_one (reuse_existing = True )
10161016 venv .create ()
10171017
1018+ txt = location .joinpath ("pyvenv.cfg" ).read_text (encoding = "utf-8" )
1019+ cfg = {
1020+ (v := line .partition ("=" ))[0 ].strip (): v [- 1 ].strip ()
1021+ for line in txt .splitlines ()
1022+ }
1023+ home = cfg ["home" ]
1024+
10181025 # Drop a venv-style pyvenv.cfg into the environment.
1019- pyvenv_cfg = """\
1020- home = /usr/bin
1026+ pyvenv_cfg = f """\
1027+ home = { home }
10211028 include-system-site-packages = false
10221029 version = 3.10
10231030 base-prefix = foo
You can’t perform that action at this time.
0 commit comments