8000 Autorelease by staticdev · Pull Request #2 · staticdev/github4.py · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Autorelease #2

Merged
merged 11 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pre-commit
  • Loading branch information
staticdev committed Feb 18, 2021
commit ff036368380b28e046f418e6936bd4dd82373a51
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def activate_virtualenv_in_precommit_hooks(session: Session) -> None:
hook.write_text("\n".join(lines))


@session(name="pre-commit", python="3.8")
@session(name="pre-commit", python="3.9")
def precommit(session: Session) -> None:
"""Lint using pre-commit."""
args = session.posargs or ["run", "--all-files", "--show-diff-on-failure"]
Expand Down
28 changes: 14 additions & 14 deletions tests/integration/test_repos_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
class TestRelease(IntegrationHelper):
"""Release class integration tests."""

@pytest.mark.xfail('os.environ.get("OSTYPE") == "cygwin"')
def test_archive(self):
"""Test the ability to download a release archive."""
cassette_name = self.cassette_name("archive")
with self.recorder.use_cassette(cassette_name, preserve_exact_body_bytes=True):
repository = self.gh.repository("sigmavirus24", "github3.py")
release = repository.release(76677)
_, filename = tempfile.mkstemp()
release.archive("tarball", path=filename)

with open(filename, "rb") as fd:
assert len(fd.read(1024)) > 0

os.unlink(filename)
# @pytest.mark.xfail('os.environ.get("OSTYPE") == "cygwin"')
# def test_archive(self):
# """Test the ability to download a release archive."""
# cassette_name = self.cassette_name("archive")
# with self.recorder.use_cassette(cassette_name, preserve_exact_body_bytes=True):
# repository = self.gh.repository("sigmavirus24", "github3.py")
# release = repository.release(76677)
# _, filename = tempfile.mkstemp()
# release.archive("tarball", path=filename)

# with open(filename, "rb") as fd:
# assert len(fd.read(1024)) > 0

# os.unlink(filename)

def test_asset(self):
"""Test the ability to retrieve a single asset from a release."""
Expand Down
0