(self, kwargs)
| 749 | @skip_if_ABSTFN_contains_backslash |
| 750 | @_parameterize({}, {'strict': ALL_BUT_LAST}, {'strict': ALLOW_MISSING}) |
| 751 | def test_realpath_resolve_parents(self, kwargs): |
| 752 | # We also need to resolve any symlinks in the parents of a relative |
| 753 | # path passed to realpath. E.g.: current working directory is |
| 754 | # /usr/doc with 'doc' being a symlink to /usr/share/doc. We call |
| 755 | # realpath("a"). This should return /usr/share/doc/a/. |
| 756 | try: |
| 757 | os.mkdir(ABSTFN) |
| 758 | os.mkdir(ABSTFN + "/y") |
| 759 | os.symlink(ABSTFN + "/y", ABSTFN + "/k") |
| 760 | |
| 761 | with os_helper.change_cwd(ABSTFN + "/k"): |
| 762 | self.assertEqual(realpath("a", **kwargs), |
| 763 | ABSTFN + "/y/a") |
| 764 | finally: |
| 765 | os_helper.unlink(ABSTFN + "/k") |
| 766 | os_helper.rmdir(ABSTFN + "/y") |
| 767 | os_helper.rmdir(ABSTFN) |
| 768 | |
| 769 | @os_helper.skip_unless_symlink |
| 770 | @skip_if_ABSTFN_contains_backslash |
nothing calls this directly
no test coverage detected