classification
Title: No tests for ntpath.samefile, ntpath.sameopenfile
Type: behavior Stage: resolved
Components: Tests, Windows Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, brian.curtin, francismb, r.david.murray, ronaldoussoren, santoso.wijaya
Priority: low Keywords: easy, patch

Created on 2011-05-06 15:12 by ronaldoussoren, last changed 2015-05-14 12:22 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
test_samefile.patch santoso.wijaya, 2011-05-12 18:04 Patch against 3.2 review
Messages (7)
msg135307 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2011-05-06 15:12
Python 3.2 introduced ntpath.samefile, but the implementation is not tested in test_ntpath.py. The same seems true of ntpath.sameopenfile.

As noted in #10684 ntpath.samefile is broken on XP, which would have been caught by unittest. I've committed a fix for that particular bug, but haven't added unittests.
msg135846 - (view) Author: Santoso Wijaya (santoso.wijaya) * Date: 2011-05-12 18:04
Attaching a patch to test a use case for ntpath.samefile (looks like sameopenfile is already tested--or at least a use case of it).
msg179036 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2013-01-04 16:04
There are tests for samefile and sameopenfile in test_genericpath.GenericTest which is included by test_ntpath (NtCommonTest subclasses test_genericpath.CommonTest which again subclasses GenericTest).

I cannot easily test on Windows (the only windows systems I've easy access to are production boxes using py2.7), but if my analysis is correct this issue can be closed
msg179037 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2013-01-04 16:09
That's true of the default branch due to some changes I recently made in the implementation of the functions, but we should probably put tests into 3.2/3.3.
msg222105 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-02 13:54
Presumably the changes made in the default branch referred to in msg179037 will have automatically been carried forward to 3.4 and 3.5.
msg243178 - (view) Author: Francis MB (francismb) * Date: 2015-05-14 11:47
Can this issue be closed?
IMHO it's not clear what still needs to be done. The patch seems to be there already.

Thanks in advance!
msg243185 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-05-14 12:22
Given that several comments say "this should be done", and your analysis indicates it is done, I think it should be safe to close it :)

Thanks for the nudge.
History
Date User Action Args
2015-05-14 12:22:37r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg243185

resolution: fixed
stage: test needed -> resolved
2015-05-14 11:47:20francismbsetnosy: + francismb
messages: + msg243178
2014-07-02 13:54:59BreamoreBoysetnosy: + BreamoreBoy

messages: + msg222105
versions: + Python 3.4, Python 3.5, - Python 3.2, Python 3.3
2013-01-04 16:09:01brian.curtinsetmessages: + msg179037
2013-01-04 16:04:54ronaldoussorensetmessages: + msg179036
2013-01-04 15:46:04serhiy.storchakasetcomponents: + Tests, - Library (Lib)
2011-05-16 19:24:33sijinjosephsetnosy: - sijinjoseph
2011-05-12 18:04:41santoso.wijayasetfiles: + test_samefile.patch

components: + Library (Lib)
versions: - Python 3.4
keywords: + patch
nosy: + santoso.wijaya

messages: + msg135846
2011-05-11 11:39:29sijinjosephsetnosy: + sijinjoseph
2011-05-06 15:13:45brian.curtinsetnosy: + brian.curtin
2011-05-06 15:12:50ronaldoussorencreate