From a69e89e9f74cecf72ad8b659295576a9ba87c499 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 13 Jan 2025 12:55:15 -0500 Subject: [PATCH] fix: use consistent -r and fix editable test Signed-off-by: Henry Schreiner --- nox/tox_to_nox.py | 6 ++++-- tests/test_tox_to_nox.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nox/tox_to_nox.py b/nox/tox_to_nox.py index 7f4b91c6..0327a9c4 100644 --- a/nox/tox_to_nox.py +++ b/nox/tox_to_nox.py @@ -120,7 +120,9 @@ def main() -> None: [ part for dep in section["deps"].strip().splitlines() - for part in (dep.split() if dep.startswith("-r") else [dep]) + for part in ( + [dep[:2] + dep[3:]] if dep.startswith("-r ") else [dep] + ) ] ) @@ -139,7 +141,7 @@ def main() -> None: ) config[name]["base_python"] = impl + section["py_dot_ver"] - change_dir = Path(section.get("change_dir", ".")) + change_dir = Path(section.get("change_dir", "")) rel_to_cwd = change_dir.relative_to(Path.cwd()) if str(rel_to_cwd) == ".": config[name]["change_dir"] = None diff --git a/tests/test_tox_to_nox.py b/tests/test_tox_to_nox.py index b23c114b..9b585788 100644 --- a/tests/test_tox_to_nox.py +++ b/tests/test_tox_to_nox.py @@ -366,7 +366,7 @@ def test_commands_with_requirements(makeconfig: Callable[[str], str]) -> None: envlist = aiohttp [testenv] - use_develop = true + usedevelop = true deps = pytest pytest-cov @@ -382,7 +382,7 @@ def test_commands_with_requirements(makeconfig: Callable[[str], str]) -> None: @nox.session(python='python3.13') def aiohttp(session): - session.install('pytest', 'pytest-cov', '-r', 'requirements/aiohttp.txt') + session.install('pytest', 'pytest-cov', '-rrequirements/aiohttp.txt') session.install('-e', '.') """).lstrip() )