MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testGetDirContentsThenLazyCompletionOfFile

Method testGetDirContentsThenLazyCompletionOfFile

tests/Issue140.py:41–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39 self.repo = self.g.get_repo("twitter/bootstrap")
40
41 def testGetDirContentsThenLazyCompletionOfFile(self):
42 contents = self.repo.get_contents("js")
43 self.assertEqual(len(contents), 15)
44 n = 0
45 for content in contents:
46 if content.path == "js/bootstrap-affix.js":
47 self.assertEqual(len(content.content), 4722) # Lazy completion
48 n += 1
49 elif content.path == "js/tests":
50 self.assertEqual(content.content, None) # No completion at all
51 n += 1
52 self.assertEqual(n, 2)
53
54 def testGetFileContents(self):
55 contents = self.repo.get_contents("js/bootstrap-affix.js")

Callers

nothing calls this directly

Calls 1

get_contentsMethod · 0.80

Tested by

no test coverage detected