Kaynağa Gözat

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>
David Pursehouse 6 yıl önce
ebeveyn
işleme
4bbba7d627
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      tests/test_project.py

+ 2 - 2
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)