| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ee385bd commit 2940662
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -533,6 +533,18 @@ def test_version_info_cache_is_per_instance(self): | |||
| 533 | 533 | git2.version_info | |
| 534 | 534 | git1.version_info | |
| 535 | 535 | ||
| 536 | + def test_version_info_cache_is_not_pickled(self): | ||
| 537 | + with _rollback_refresh(): | ||
| 538 | + with _fake_git(123, 456, 789) as path: | ||
| 539 | + git1 = Git() | ||
| 540 | + refresh(path) | ||
| 541 | + git1.version_info | ||
| 542 | + git2 = pickle.loads(pickle.dumps(git1)) | ||
| 543 | + os.remove(path) # Arrange that the second subprocess call will fail. | ||
| 544 | + with self.assertRaises(GitCommandNotFound): | ||
| 545 | + git2.version_info | ||
| 546 | + git1.version_info | ||
| 547 | + | ||
| 536 | 548 | def test_successful_refresh_with_arg_invalidates_cached_version_info(self): | |
| 537 | 549 | with _rollback_refresh(): | |
| 538 | 550 | with _fake_git(11, 111, 1) as path1: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments