diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f2c6bd..95f0e37 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: exclude_types: [javascript,json] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.0 + rev: v0.16.1 hooks: - id: ruff-check args: [--fix] diff --git a/test/test_git.py b/test/test_git.py index 2c803e7..244b5ee 100644 --- a/test/test_git.py +++ b/test/test_git.py @@ -21,7 +21,7 @@ def test_error_on_unknown_option(git2cpp_path): p = subprocess.run(cmd, capture_output=True) assert p.returncode == 109 assert p.stdout == b"" - assert p.stderr.startswith(b"The following argument was not expected: --unknown") + assert b"The following argument was not expected: --unknown" in p.stderr @pytest.mark.skipif(not GIT2CPP_TEST_WASM, reason="Only test in WebAssembly") diff --git a/test/test_init.py b/test/test_init.py index 9183780..f1e5088 100644 --- a/test/test_init.py +++ b/test/test_init.py @@ -97,7 +97,7 @@ def test_error_on_unknown_option(git2cpp_path): p = subprocess.run(cmd, capture_output=True) assert p.returncode == 109 assert p.stdout == b"" - assert p.stderr.startswith(b"The following argument was not expected: --unknown") + assert b"The following argument was not expected: --unknown" in p.stderr def test_error_on_repeated_directory(git2cpp_path): @@ -105,7 +105,7 @@ def test_error_on_repeated_directory(git2cpp_path): p = subprocess.run(cmd, capture_output=True) assert p.returncode == 109 assert p.stdout == b"" - assert p.stderr.startswith(b"The following argument was not expected: def") + assert b"The following argument was not expected: def" in p.stderr def test_init_creates_missing_parent_directories(git2cpp_path, tmp_path):