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

Method setUp

tests/GitRelease.py:86–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

84
85class GitRelease(Framework.TestCase):
86 def setUp(self):
87 super().setUp()
88 self.new_tag = "v1.25.2" # Used for new releases
89 self.content_path = "content.txt"
90 self.artifact_path = "archive.zip"
91
92 with open(self.content_path, "w") as zip_content:
93 zip_content.write("Pedro for president.")
94
95 artifact = zipfile.ZipFile(self.artifact_path, "w")
96 artifact.write(self.content_path)
97 artifact.close()
98 self.repo = self.g.get_user(user).get_repo(repo_name)
99 self.release = self.repo.get_release(release_id)
100
101 def tearDown(self):
102 if os.path.exists(self.content_path):

Callers

nothing calls this directly

Calls 5

writeMethod · 0.80
get_userMethod · 0.80
get_releaseMethod · 0.80
closeMethod · 0.45
get_repoMethod · 0.45

Tested by

no test coverage detected