| 369 | assert chk(path1.join(class="st">"somepickle")) |
| 370 | |
| 371 | def test_copy_file(self, path1): |
| 372 | otherdir = path1.join(class="st">"otherdir") |
| 373 | initpy = otherdir.join(class="st">"__init__.py") |
| 374 | copied = otherdir.join(class="st">"copied") |
| 375 | initpy.copy(copied) |
| 376 | try: |
| 377 | assert copied.check() |
| 378 | s1 = initpy.read_text(encoding=class="st">"utf-8") |
| 379 | s2 = copied.read_text(encoding=class="st">"utf-8") |
| 380 | assert s1 == s2 |
| 381 | finally: |
| 382 | if copied.check(): |
| 383 | copied.remove() |
| 384 | |
| 385 | def test_copy_dir(self, path1): |
| 386 | otherdir = path1.join(class="st">"otherdir") |