bpo-28113: Convert Win32{Symlink,Junction}Tests to use support.TESTFN#12907
Draft
berkerpeksag wants to merge 1 commit intopython:mainfrom
Draft
bpo-28113: Convert Win32{Symlink,Junction}Tests to use support.TESTFN#12907berkerpeksag wants to merge 1 commit intopython:mainfrom
berkerpeksag wants to merge 1 commit intopython:mainfrom
Conversation
taleinat
requested changes
May 27, 2019
Contributor
taleinat
left a comment
There was a problem hiding this comment.
Note that Win32JunctionTests also uses os.path.dirname(os.path.abspath(__file__)); that should be amended as well.
| dirlink = 'dirlinktest' | ||
| dirlink_target = os.path.dirname(filelink_target) | ||
| missing_link = 'missing link' | ||
| dirlink_target = os.path.join(support.TESTFN, 'win32_symlink_tests') |
Contributor
There was a problem hiding this comment.
support.TESTFN is just a path, but not an existing directory.
Perhaps add something the following to setUp()?
tempdir = tempfile.TemporaryDirectory(prefix=support.TESTFN)
self.addCleanup(tempdir.cleanup)
self.dirlink_target = os.path.join(tempdir , 'win32_symlink_tests')
self.filelink_target = os.path.join(self.dirlink_target, support.TESTFN)
self.dirlink = os.path.join(tempdir , 'dirlinktest')
self.filelink = os.path.join(tempdir , 'filelinktest')
self.missing_link = os.path.join(tempdir , 'missinglinktest')With this all of the other existence checks and cleanups may be removed.
| # was created with target_is_dir==True. | ||
| os.remove(self.missing_link) | ||
|
|
||
| @unittest.skip("currently fails; consider for improvement") |
Contributor
There was a problem hiding this comment.
Why is this no longer skipped: has this behavior been implemented?
Likewise for the next test below.
|
When you're done making the requested changes, leave the comment: |
|
This PR is stale because it has been open for 30 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue28113