From 4bbba7d627d9d801f9e3ab50a864a0d2b70bb3e7 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 12 Feb 2020 11:14:55 +0900 Subject: [PATCH] Fix duplicate method name in test_project.py flake8 reports: F811 redefinition of unused 'test_src_block_dir' from line 259 which is caused by having two methods with the same name. Rename them both to better desribe their purpose. Change-Id: If7612a42001776d71bb1a6a80fc631d3d262e6ce Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254449 Reviewed-by: Mike Frysinger Tested-by: David Pursehouse --- tests/test_project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_project.py b/tests/test_project.py index dc41f4c0..bde38c47 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -256,7 +256,7 @@ class CopyFile(CopyLinkTestCase): cf = self.CopyFile('bar/foo.txt', 'foo') self.assertRaises(error.ManifestInvalidPathError, cf._Copy) - def test_src_block_dir(self): + def test_src_block_copy_from_dir(self): """Do not allow copying from a directory.""" src = os.path.join(self.worktree, 'dir') os.makedirs(src) @@ -279,7 +279,7 @@ class CopyFile(CopyLinkTestCase): cf = self.CopyFile('foo.txt', 'sym/foo.txt') self.assertRaises(error.ManifestInvalidPathError, cf._Copy) - def test_src_block_dir(self): + def test_src_block_copy_to_dir(self): """Do not allow copying to a directory.""" src = os.path.join(self.worktree, 'foo.txt') self.touch(src)