(self)
| 1438 | |
| 1439 | @os_helper.skip_unless_xattr |
| 1440 | def test_copy2_xattr(self): |
| 1441 | tmp_dir = self.mkdtemp() |
| 1442 | src = os.path.join(tmp_dir, 'foo') |
| 1443 | dst = os.path.join(tmp_dir, 'bar') |
| 1444 | create_file(src, 'foo') |
| 1445 | os.setxattr(src, 'user.foo', b'42') |
| 1446 | shutil.copy2(src, dst) |
| 1447 | self.assertEqual( |
| 1448 | os.getxattr(src, 'user.foo'), |
| 1449 | os.getxattr(dst, 'user.foo')) |
| 1450 | os.remove(dst) |
| 1451 | |
| 1452 | def test_copy_return_value(self): |
| 1453 | # copy and copy2 both return their destination path. |
nothing calls this directly
no test coverage detected