diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index afdf388..904fa2c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ exclude: '^merge-files/tests/e2e/test-data/.*' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-toml - id: check-symlinks @@ -11,29 +11,25 @@ repos: - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--line-length=88] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 args: ['--config=.flake8'] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.2 + rev: v0.9.0.6 hooks: - id: shellcheck args: [-eSC1091] - repo: https://github.com/jackdewinter/pymarkdown - rev: v0.9.9 + rev: v0.9.17 hooks: - id: pymarkdown -- repo: https://github.com/cmake-lint/cmake-lint - rev: 1.4.2 - hooks: - - id: cmakelint diff --git a/dest_file.txt b/dest_file.txt deleted file mode 100644 index beef906..0000000 --- a/dest_file.txt +++ /dev/null @@ -1 +0,0 @@ -World \ No newline at end of file diff --git a/ienv/tests/test_symlink.py b/ienv/tests/test_symlink.py index b2ba736..8182aee 100644 --- a/ienv/tests/test_symlink.py +++ b/ienv/tests/test_symlink.py @@ -4,9 +4,9 @@ from ienv.squish import replace_with_symlink -def test_replace_with_symlink_file_exists(): - src = Path("test_file.txt") - dest = Path("dest_file.txt") +def test_replace_with_symlink_file_exists(tmpdir): + src = Path(tmpdir / "test_file.txt") + dest = Path(tmpdir / "dest_file.txt") src.write_text("Hello") dest.write_text("World") @@ -17,9 +17,9 @@ def test_replace_with_symlink_file_exists(): assert src.resolve() == dest.absolute() -def test_replace_with_symlink_preserve_attributes(): - src = Path("test_file.txt") - dest = Path("dest_file.txt") +def test_replace_with_symlink_preserve_attributes(tmpdir): + src = Path(tmpdir / "test_file.txt") + dest = Path(tmpdir / "dest_file.txt") src.write_text("Hello") dest.write_text("World") diff --git a/test_file.txt b/test_file.txt deleted file mode 120000 index 3882bbe..0000000 --- a/test_file.txt +++ /dev/null @@ -1 +0,0 @@ -/home/gaz/src/ienv/dest_file.txt \ No newline at end of file