Skip to content

Fix version_info cache invalidation, typing, parsing, and serialization #1838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
Next Next commit
Use TemporaryFile as a context manager
(This also uses assertRaises as a context manager, but that is
just for improved clarity.)
  • Loading branch information
EliahKagan committed Feb 21, 2024
commit e40fc2cd2677c8f7e7c067583df00572430442ec
10 changes: 3 additions & 7 deletions test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,9 @@ def test_it_ignores_false_kwargs(self, git):
self.assertTrue("pass_this_kwarg" not in git.call_args[1])

def test_it_raises_proper_exception_with_output_stream(self):
tmp_file = TemporaryFile()
self.assertRaises(
GitCommandError,
self.git.checkout,
"non-existent-branch",
output_stream=tmp_file,
)
with TemporaryFile() as tmp_file:
with self.assertRaises(GitCommandError):
self.git.checkout("non-existent-branch", output_stream=tmp_file)

def test_it_accepts_environment_variables(self):
filename = fixture_path("ls_tree_empty")
Expand Down