Skip to content

Commit

Permalink
Merge pull request #12 from dnv-opensource/update-pytest-settings-and…
Browse files Browse the repository at this point in the history
…-vs-code-debug-launch-configurations

Update pytest settings and vs code debug launch configurations
  • Loading branch information
ClaasRostock authored Dec 28, 2023
2 parents 9a8e984 + da0db9e commit 94de3fc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
14 changes: 12 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -15,14 +13,14 @@
},
},
"autoDocstring.docstringFormat": "numpy",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.analysis.logLevel": "Warning",
"python.analysis.completeFunctionParens": false,
"python.analysis.diagnosticMode": "workspace",
"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,
Expand All @@ -44,4 +42,4 @@
"includeAllSymbols": true,
},
],
}
}
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ reportUntypedNamedTuple = "warning"
testpaths = "tests"
addopts = "--strict-markers"
xfail_strict = true
pythonpath = ["src"]
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 0 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ console_scripts =
importSystemStructure = ospx.cli.importSystemStructure:main
watchCosim = ospx.watch.cli.watchCosim:main

[tool:pytest]
testpaths = tests
addopts = --strict-markers
xfail_strict = True

[coverage:run]
source = ospx
branch = True
Expand All @@ -88,6 +83,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}

0 comments on commit 94de3fc

Please sign in to comment.