Sfoglia il codice sorgente

Replace 'unlink' with 'rm' in tests.

Several Unix-like systems (eg. OpenBSD) don't have 'unlink' utility. 'rm' does
exactly the same job, so using 'rm' instead of 'unlink' makes dulwich tests
more portable.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Dmitrij D. Czarkoff 11 anni fa
parent
commit
0d2d094b67
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      dulwich/tests/test_hooks.py
  2. 1 1
      dulwich/tests/test_repository.py

+ 1 - 1
dulwich/tests/test_hooks.py

@@ -113,7 +113,7 @@ exit 0
 
         (fd, path) = tempfile.mkstemp()
         post_commit_msg = """#!/bin/sh
-unlink %(file)s
+rm %(file)s
 """ % {'file': path}
 
         post_commit_msg_fail = """#!/bin/sh

+ 1 - 1
dulwich/tests/test_repository.py

@@ -460,7 +460,7 @@ exit 0
 
         (fd, path) = tempfile.mkstemp(dir=repo_dir)
         post_commit_msg = """#!/bin/sh
-unlink %(file)s
+rm %(file)s
 """ % {'file': path}
 
         root_sha = r.do_commit(