From eeea5c76735fe977febe9fb318a145bc825da70d Mon Sep 17 00:00:00 2001 From: Claas Date: Wed, 27 Dec 2023 19:11:22 +0100 Subject: [PATCH 1/5] requirements-dev.txt: removed pytest-randomly (I don't think we need it) --- requirements-dev.txt | 1 - setup.cfg | 1 - 2 files changed, 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index facdf688..a886cb94 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,5 @@ pytest>=7.4 pytest-cov>=4.1 -pytest-randomly>=3.15 black[jupyter]==23.12 ruff==0.1.8 pyright==1.1.338 diff --git a/setup.cfg b/setup.cfg index 77929844..71431055 100644 --- a/setup.cfg +++ b/setup.cfg @@ -82,6 +82,5 @@ system_site_packages = True deps = pytest>=7.4 pytest-cov>=4.1 - pytest-randomly>=3.15 commands = pytest --cov --cov-config setup.cfg {posargs} From 2648e3402e85bcb04d970358e0a4a130874dcfe7 Mon Sep 17 00:00:00 2001 From: Claas Date: Wed, 27 Dec 2023 19:12:58 +0100 Subject: [PATCH 2/5] pyproject.toml: removed pythonpath entry from pytest.ini_options (not needed as long as a .env file is used) --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c15f6402..c65209a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,4 +111,3 @@ reportUntypedNamedTuple = "warning" testpaths = "tests" addopts = "--strict-markers" xfail_strict = true -pythonpath = ["src"] From 57769b56f4a8ab0dd66f94a865782f6180f09191 Mon Sep 17 00:00:00 2001 From: Claas Date: Wed, 27 Dec 2023 19:14:04 +0100 Subject: [PATCH 3/5] setup.cfg: removed pytest options as these have been moved to pyproject.toml --- setup.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 71431055..2abf4e57 100644 --- a/setup.cfg +++ b/setup.cfg @@ -52,11 +52,6 @@ exclude = console_scripts = dictParser = dictIO.cli.dictParser:main -[tool:pytest] -testpaths = tests -addopts = --strict-markers -xfail_strict = True - [coverage:run] source = dictIO branch = True From 702225f5f9445a76bfe1733084cf333cbe045eb8 Mon Sep 17 00:00:00 2001 From: Claas Date: Wed, 27 Dec 2023 19:15:31 +0100 Subject: [PATCH 4/5] VS Code debug launch configurations: updated the launch configuration for debugging tests --- .vscode/launch.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6b91b5b0..76e6c876 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,11 +5,21 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug Unit Test", + "name": "Python: Debug Tests", "type": "python", "request": "launch", + "program": "${file}", + "purpose": [ + "debug-test" + ], + "console": "integratedTerminal", + "env": { + "PYTEST_ADDOPTS": "--no-cov" + }, + "autoReload": { + "enable": true + }, "justMyCode": false, - "program": "${file}" }, { "name": "Python: Current File, cwd = file dir, envFile", From 36aa4f592ad8c2f360f3edf3ce1b84104bd7bb11 Mon Sep 17 00:00:00 2001 From: Claas Date: Wed, 27 Dec 2023 19:17:12 +0100 Subject: [PATCH 5/5] VS Code settings: deleted orphaned entries --- .vscode/settings.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 52762a52..398edb90 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,8 +5,6 @@ "python.terminal.activateEnvInCurrentTerminal": true, "python.languageServer": "Pylance", "ruff.importStrategy": "fromEnvironment", - "python.linting.enabled": false, - "python.formatting.provider": "black", "editor.formatOnSave": true, "[python]": { "editor.formatOnSave": true, @@ -15,6 +13,7 @@ }, }, "autoDocstring.docstringFormat": "numpy", + "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.analysis.logLevel": "Warning", "python.analysis.completeFunctionParens": false, @@ -22,9 +21,8 @@ "python.analysis.diagnosticSeverityOverrides": {}, "python.analysis.indexing": true, "python.analysis.autoImportCompletions": true, - "python.analysis.autoImportUserSymbols": true, "python.analysis.inlayHints.variableTypes": false, "python.analysis.inlayHints.functionReturnTypes": false, "python.analysis.inlayHints.pytestParameters": true, "python.terminal.executeInFileDir": true, -} +} \ No newline at end of file