(self, tmpdir, bin)
| 720 | |
| 721 | @pytest.mark.parametrize(class="st">"bin", (False, True)) |
| 722 | def test_dump(self, tmpdir, bin): |
| 723 | path = tmpdir.join(fclass="st">"dumpfile{int(bin)}") |
| 724 | try: |
| 725 | d = {class="st">"answer": 42} |
| 726 | path.dump(d, bin=bin) |
| 727 | f = path.open(class="st">"rb+") |
| 728 | import pickle |
| 729 | |
| 730 | dnew = pickle.load(f) |
| 731 | assert d == dnew |
| 732 | finally: |
| 733 | f.close() |
| 734 | |
| 735 | def test_setmtime(self): |
| 736 | import tempfile |