Skip to content

Commit

Permalink
another trial to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YevheniiSemendiak committed Sep 6, 2024
1 parent 3590e99 commit 0b409e2
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: Run tests
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu, macos, windows]
fail-fast: false
runs-on: ${{ matrix.os }}-latest
Expand Down
94 changes: 47 additions & 47 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.6.0'
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/PyCQA/isort
rev: '5.13.2'
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: '24.8.0'
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
args: ['--line-length', '88']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.6.0'
hooks:
- id: check-case-conflict
- id: check-yaml
args: ['--unsafe']
- id: check-added-large-files
- id: end-of-file-fixer
exclude: "json$"
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: check-symlinks
- id: debug-statements
# Another entry is required to apply file-contents-sorter to another file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.6.0'
hooks:
- id: file-contents-sorter
files: |
.gitignore
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.17.0'
hooks:
- id: pyupgrade
args: ['--py36-plus']
- repo: https://github.com/PyCQA/flake8
rev: '7.1.1'
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/PyCQA/isort
rev: "5.13.2"
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: "24.8.0"
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.6+
args: ["--line-length", "88"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-case-conflict
- id: check-yaml
args: ["--unsafe"]
- id: check-added-large-files
- id: end-of-file-fixer
exclude: "json$"
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: check-symlinks
- id: debug-statements
# Another entry is required to apply file-contents-sorter to another file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: file-contents-sorter
files: |
.gitignore
- repo: https://github.com/asottile/pyupgrade
rev: "v3.16.0"
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/PyCQA/flake8
rev: "7.1.1"
hooks:
- id: flake8
5 changes: 2 additions & 3 deletions tests/unit/test_bake_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import yaml
from cookiecutter.exceptions import FailedHookException
from path import Path as PPath
from pipx.paths import DEFAULT_PIPX_BIN_DIR, DEFAULT_PIPX_HOME, FALLBACK_PIPX_HOMES
from pipx.paths import DEFAULT_PIPX_BIN_DIR, DEFAULT_PIPX_GLOBAL_BIN_DIR
from pytest_cookies.plugin import Cookies # type: ignore
from pytest_virtualenv import VirtualEnv

Expand Down Expand Up @@ -133,8 +133,7 @@ def test_flow_name(
cur_path = os.environ["PATH"].split(os.pathsep)
avoid_paths = (
str(DEFAULT_PIPX_BIN_DIR),
str(DEFAULT_PIPX_HOME),
str(FALLBACK_PIPX_HOMES),
str(DEFAULT_PIPX_GLOBAL_BIN_DIR),
)
filtered_path = list(filter(lambda x: x not in avoid_paths, cur_path))
monkeypatch.setenv("PATH", os.pathsep.join(filtered_path))
Expand Down

0 comments on commit 0b409e2

Please sign in to comment.