@@ -41,10 +41,10 @@ if "-v" in sys.argv or "--verbose" in sys.argv:
4141tests_dir = dirname(abspath(__file__))
4242
4343
44- # import patch .py from parent directory
44+ # import patch_ng .py from parent directory
4545save_path = sys.path
4646sys.path.insert(0, dirname(tests_dir))
47- import patch
47+ import patch_ng
4848sys.path = save_path
4949
5050
@@ -68,7 +68,7 @@ class TestPatchFiles(unittest.TestCase):
6868 f2.close()
6969 if f1:
7070 f1.close()
71-
71+
7272 def _assert_dirs_equal(self, dir1, dir2, ignore=[]):
7373 """ compare dir1 with reference dir2
7474 .svn dirs are ignored
@@ -94,23 +94,23 @@ class TestPatchFiles(unittest.TestCase):
9494 continue
9595 self.fail("extra file or directory: %s" % e2)
9696
97-
97+
9898 def _run_test(self, testname):
9999 """
100100 boilerplate for running *.patch file tests
101101 """
102102
103103 # 1. create temp test directory
104104 # 2. copy files
105- # 3. execute file-based patch
105+ # 3. execute file-based patch
106106 # 4. compare results
107107 # 5. cleanup on success
108108
109109 tmpdir = mkdtemp(prefix="%s."%testname)
110110
111111 patch_file = join(tmpdir, "%s.patch" % testname)
112112 shutil.copy(join(tests_dir, "%s.patch" % testname), patch_file)
113-
113+
114114 from_src = join(tests_dir, "%s.from" % testname)
115115 from_tgt = join(tmpdir, "%s.from" % testname)
116116
@@ -129,7 +129,7 @@ class TestPatchFiles(unittest.TestCase):
129129
130130 # 3.
131131 # test utility as a whole
132- patch_tool = join(dirname(tests_dir), "patch .py")
132+ patch_tool = join(dirname(tests_dir), "patch_ng .py")
133133 save_cwd = os.getcwdu()
134134 os.chdir(tmpdir)
135135 if verbose:
@@ -150,7 +150,7 @@ class TestPatchFiles(unittest.TestCase):
150150 # need recursive compare
151151 self._assert_dirs_equal(join(tests_dir, "%s.to" % testname), tmpdir, "%s.patch" % testname)
152152
153-
153+
154154
155155 shutil.rmtree(tmpdir)
156156 return 0
@@ -200,7 +200,7 @@ class TestCheckPatched(unittest.TestCase):
200200 pto3 = patch.fromfile("03trail_fname.patch")
201201 self.assertEqual(None, pto3.can_patch("03trail_fname.to"))
202202 self.assertEqual(None, pto3.can_patch("not_in_source.also"))
203-
203+
204204 def test_multiline_false_on_other_file(self):
205205 pto = patch.fromfile("01uni_multi.patch")
206206 os.chdir(join(tests_dir, "01uni_multi.from"))
0 commit comments