Fix pep8 and coverage

This commit is contained in:
Vincent Jacques
2013-02-17 13:53:13 +01:00
parent 6c84693d98
commit 1e8dda73db
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ import GithubException
class _NotSetType:
def __repr__(self):
return "NotSet"
return "NotSet" # pragma no cover
NotSet = _NotSetType()
+1 -1
View File
@@ -889,7 +889,7 @@ class Repository(github.GithubObject.GithubObject):
None
)
return [
github.ContentFile.ContentFile(self._requester, attributes, completed=attributes["type"]!="file") # Lazy completion only makes sense for files. See discussion here: https://github.com/jacquev6/PyGithub/issues/140#issuecomment-13481130
github.ContentFile.ContentFile(self._requester, attributes, completed=(attributes["type"] != "file")) # Lazy completion only makes sense for files. See discussion here: https://github.com/jacquev6/PyGithub/issues/140#issuecomment-13481130
for attributes in data
]
+4
View File
@@ -38,4 +38,8 @@ class Issue140(Framework.TestCase): # https://github.com/jacquev6/PyGithub/issu
def testGetFileContents(self):
contents = self.repo.get_file_contents("/js/bootstrap-affix.js")
self.assertEqual(contents.encoding, "base64")
self.assertEqual(contents.url, "https://api.github.com/repos/twitter/bootstrap/contents/js/bootstrap-affix.js")
self.assertEqual(len(contents.content), 4722)
def testGetDirContentsWithRef(self):
contents = self.repo.get_dir_contents("/js", "")