This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Simple test for os.startfile
Type: Stage:
Components: None Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: theller Nosy List: loewis, nnorwitz, theller
Priority: normal Keywords: patch

Created on 2006-04-04 08:53 by theller, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_startfile.py theller, 2006-04-04 09:26 Lib\test\test_startfile.py
Messages (8)
msg49959 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-04-04 08:53
The attached file test_startfile.py is a very simple
test for os.startfile on Windows.  It needs an empty
file 'empty.vbs' as well.
msg49960 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-04-04 09:26
Logged In: YES 
user_id=11105

Updated the test to work when run from different directory.
msg49961 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-04 18:13
Logged In: YES 
user_id=21627

The patch looks fine, except that the conversion of a path
name to Unicode should use the "mbcs" codec. Please apply
(before the trunk freeze, or after the unfreeze); please
also add empty.vbs to Tools/msi/msi.py
msg49962 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-04-04 18:19
Logged In: YES 
user_id=11105

Do I have to add something to Lib/test/regrtest.py, so that
the test is skipped on non-Windows platforms?
msg49963 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-04-04 18:38
Logged In: YES 
user_id=33168

Thanks Thomas!  I'll check about the non-Windows platforms.
msg49964 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2006-04-04 18:43
Logged In: YES 
user_id=11105

Committed as rev. 43644 and rev. 43645.  Changed the unicode
conversion, and added some comments.

Thanks.
msg49965 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-04 18:44
Logged In: YES 
user_id=21627

Indeed: you should phrase the import as

from os import startfile

Then it will get skipped if startfile is not available.

msg49966 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-04-04 20:58
Logged In: YES 
user_id=33168

This is checked in and working AFAIK.  closing.
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43156
2006-04-04 08:53:52thellercreate