Преглед на файлове

Skip tests that need sed on windows

Jelmer Vernooij преди 1 месец
родител
ревизия
55dc0f6380
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      tests/test_cli.py

+ 4 - 0
tests/test_cli.py

@@ -29,6 +29,7 @@ import shutil
 import sys
 import tempfile
 import unittest
+from unittest import skipIf
 from unittest.mock import MagicMock, patch
 
 from dulwich import cli
@@ -372,6 +373,7 @@ class FilterBranchCommandTest(DulwichCliTestCase):
             len(original_refs) > 0, "No original refs found after filter-branch"
         )
 
+    @skipIf(sys.platform == "win32", "sed command not available on Windows")
     def test_filter_branch_msg_filter(self):
         """Test filter-branch with message filter."""
         # Run filter-branch to prepend [FILTERED] to commit messages
@@ -420,6 +422,7 @@ class FilterBranchCommandTest(DulwichCliTestCase):
         result, stdout, stderr = self._run_cli("log")
         self.assertNotIn("Modify root file only", stdout)
 
+    @skipIf(sys.platform == "win32", "sed command not available on Windows")
     def test_filter_branch_force(self):
         """Test filter-branch with force option."""
         # Run filter-branch once with a filter that actually changes something
@@ -449,6 +452,7 @@ class FilterBranchCommandTest(DulwichCliTestCase):
         )
         self.assertEqual(result, 0)
 
+    @skipIf(sys.platform == "win32", "sed command not available on Windows")
     def test_filter_branch_specific_branch(self):
         """Test filter-branch on a specific branch."""
         # Switch to test-branch and add a commit