use async test

This commit is contained in:
Thephaseless 2024-11-26 17:43:25 +00:00
parent ad83234e77
commit 79b21161e1
5 changed files with 30 additions and 34 deletions

View File

@ -56,7 +56,7 @@ jobs:
rm ./google-chrome-stable_current_amd64.deb rm ./google-chrome-stable_current_amd64.deb
- name: Run tests - name: Run tests
run: poetry run pytest --retries 2 --show-progress run: poetry run pytest --retries 2 -n auto --xvfb
- name: Upload screenshots if tests fail - name: Upload screenshots if tests fail
if: failure() if: failure()

36
.vscode/launch.json vendored
View File

@ -1,27 +1,19 @@
{ {
"configurations": [
{
"console": "integratedTerminal",
"env": {
"LOG_LEVEL": "DEBUG"
},
"justMyCode": false,
"name": "Python Debugger: Main",
"program": "main.py",
"request": "launch",
"type": "debugpy"
},
],
// Use IntelliSense to learn about possible attributes. // Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes. // Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0"
"configurations": [
{
"name": "Python Debugger: Main",
"type": "debugpy",
"justMyCode": false,
"env": {
"LOG_LEVEL": "DEBUG",
},
"request": "launch",
"program": "main.py",
"console": "integratedTerminal"
},
{
"name": "Python Debugger: Current File",
"justMyCode": false,
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
} }

23
.vscode/settings.json vendored
View File

@ -1,20 +1,23 @@
{ {
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
"python.terminal.activateEnvironment": true,
"[python]": { "[python]": {
"editor.defaultFormatter": "charliermarsh.ruff", "editor.defaultFormatter": "charliermarsh.ruff"
}, },
"python.analysis.autoImportCompletions": true,
"python.analysis.packageIndexDepths": [ "python.analysis.packageIndexDepths": [
{ {
"name": "",
"depth": 5, "depth": 5,
"includeAllSymbols": true, "includeAllSymbols": true,
"name": ""
} }
], ],
"python.analysis.typeCheckingMode": "standard",
"python.terminal.activateEnvironment": true,
"python.testing.pytestArgs": [
"-n",
"auto",
"--retries=2",
"--xvfb"
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false
} }

2
poetry.lock generated
View File

@ -2195,4 +2195,4 @@ h11 = ">=0.9.0,<1"
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.12" python-versions = "^3.12"
content-hash = "b14c2514cac9868f24705f98bfe5aaae06ed4b21508b9e4622ada2938338b525" content-hash = "531739092d03e663fe62d41b76d59b38204657717413e297158b6a21779e6075"

View File

@ -19,6 +19,7 @@ pyautogui = "^0.9.54"
beautifulsoup4 = "^4.12.3" beautifulsoup4 = "^4.12.3"
pytest-retry = "^1.6.3" pytest-retry = "^1.6.3"
pytest-progress = "^1.3.0" pytest-progress = "^1.3.0"
pytest-xdist = "^3.6.1"
[build-system] [build-system]