summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2020-02-12 11:14:55 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2020-02-12 02:55:51 +0000
commit4bbba7d627d9d801f9e3ab50a864a0d2b70bb3e7 (patch)
tree24d59bdbb7839224f53289b417c0951b91fd7004
parentdc1d0e0c7fffa5109048ac52a67aa97bb362ae3a (diff)
downloadgit-repo-4bbba7d627d9d801f9e3ab50a864a0d2b70bb3e7.tar.gz
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 <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
-rw-r--r--tests/test_project.py4
1 files 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):
256 cf = self.CopyFile('bar/foo.txt', 'foo') 256 cf = self.CopyFile('bar/foo.txt', 'foo')
257 self.assertRaises(error.ManifestInvalidPathError, cf._Copy) 257 self.assertRaises(error.ManifestInvalidPathError, cf._Copy)
258 258
259 def test_src_block_dir(self): 259 def test_src_block_copy_from_dir(self):
260 """Do not allow copying from a directory.""" 260 """Do not allow copying from a directory."""
261 src = os.path.join(self.worktree, 'dir') 261 src = os.path.join(self.worktree, 'dir')
262 os.makedirs(src) 262 os.makedirs(src)
@@ -279,7 +279,7 @@ class CopyFile(CopyLinkTestCase):
279 cf = self.CopyFile('foo.txt', 'sym/foo.txt') 279 cf = self.CopyFile('foo.txt', 'sym/foo.txt')
280 self.assertRaises(error.ManifestInvalidPathError, cf._Copy) 280 self.assertRaises(error.ManifestInvalidPathError, cf._Copy)
281 281
282 def test_src_block_dir(self): 282 def test_src_block_copy_to_dir(self):
283 """Do not allow copying to a directory.""" 283 """Do not allow copying to a directory."""
284 src = os.path.join(self.worktree, 'foo.txt') 284 src = os.path.join(self.worktree, 'foo.txt')
285 self.touch(src) 285 self.touch(src)