mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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>
This commit is contained in:
parent
dc1d0e0c7f
commit
4bbba7d627
@ -256,7 +256,7 @@ class CopyFile(CopyLinkTestCase):
|
|||||||
cf = self.CopyFile('bar/foo.txt', 'foo')
|
cf = self.CopyFile('bar/foo.txt', 'foo')
|
||||||
self.assertRaises(error.ManifestInvalidPathError, cf._Copy)
|
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."""
|
"""Do not allow copying from a directory."""
|
||||||
src = os.path.join(self.worktree, 'dir')
|
src = os.path.join(self.worktree, 'dir')
|
||||||
os.makedirs(src)
|
os.makedirs(src)
|
||||||
@ -279,7 +279,7 @@ class CopyFile(CopyLinkTestCase):
|
|||||||
cf = self.CopyFile('foo.txt', 'sym/foo.txt')
|
cf = self.CopyFile('foo.txt', 'sym/foo.txt')
|
||||||
self.assertRaises(error.ManifestInvalidPathError, cf._Copy)
|
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."""
|
"""Do not allow copying to a directory."""
|
||||||
src = os.path.join(self.worktree, 'foo.txt')
|
src = os.path.join(self.worktree, 'foo.txt')
|
||||||
self.touch(src)
|
self.touch(src)
|
||||||
|
Loading…
Reference in New Issue
Block a user