From 79b21161e1f30a729b17dba745629be11e9eb103 Mon Sep 17 00:00:00 2001 From: Thephaseless <kukubaorch@gmail.com> Date: Tue, 26 Nov 2024 17:43:25 +0000 Subject: [PATCH] use async test --- .github/workflows/docker-publish.yml | 2 +- .vscode/launch.json | 36 +++++++++++----------------- .vscode/settings.json | 23 ++++++++++-------- poetry.lock | 2 +- pyproject.toml | 1 + 5 files changed, 30 insertions(+), 34 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 52091e9..444d78c 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -56,7 +56,7 @@ jobs: rm ./google-chrome-stable_current_amd64.deb - 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 if: failure() diff --git a/.vscode/launch.json b/.vscode/launch.json index 3da0509..3c689cb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "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" - } - ] + "version": "0.2.0" } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index c514d46..4c95a13 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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]": { - "editor.defaultFormatter": "charliermarsh.ruff", + "editor.defaultFormatter": "charliermarsh.ruff" }, + "python.analysis.autoImportCompletions": true, "python.analysis.packageIndexDepths": [ { - "name": "", "depth": 5, "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 } \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 91179b7..6fa4222 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2195,4 +2195,4 @@ h11 = ">=0.9.0,<1" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "b14c2514cac9868f24705f98bfe5aaae06ed4b21508b9e4622ada2938338b525" +content-hash = "531739092d03e663fe62d41b76d59b38204657717413e297158b6a21779e6075" diff --git a/pyproject.toml b/pyproject.toml index 8ca83bf..3eb79a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ pyautogui = "^0.9.54" beautifulsoup4 = "^4.12.3" pytest-retry = "^1.6.3" pytest-progress = "^1.3.0" +pytest-xdist = "^3.6.1" [build-system]