<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!--body{padding:1ex;margin:0px;font-family:sans-serif;font-size:small;}a[href]{color:-moz-hyperlinktext !important;text-decoration:-moz-anchor-decoration;}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em;}blockquote blockquote{border-color:#006312;}blockquote blockquote blockquote{border-color:#540000;}--></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>I'm working on a set of unit tests designed to stress test some file handling capabilities of our application.</div>
<div> </div>
<div>Listed below are some file names designed to cause failures when used with open/codecs.open and with the os/shutil module file functions. Can anyone think of additional scenarios (path names or unusual file access) that we could test against? My tests will initially be for the Windows platform (2000-Windows 7), but I would welcome Linux and/or Mac specific failure conditions as well.</div>
<div> </div>
<div>UNITTEST_DRIVE_NOT_READY = r'a:'<br>
UNITTEST_DRIVE_READ_ONLY = r'g:' # CD drive with CD</div>
<div>UNITTEST_UNC_NOT_EXIST = r'\\unc_not_exist'<br>
<br>
UNITTEST_FILE_BAD_CHARS = r'path_bad_chars_*<>|'<br>
UNITTEST_FILE_NO_WRITE = r'c:\program files'<br>
UNITTEST_FILE_NOT_EXIST = r'\path_not_exist'<br>
<br>
UNITTEST_FILE_LOCKED = r'file_locked.tmp'<br>
unittest_file_locked = open( UNITTEST_FILE_LOCKED, 'w' )<br>
<br>
UNITTEST_UNICODE_PATH = ur'\xunicode_test_\xb0_\xb1_'<br>
</div>
<div>Thank you,</div>
<div>Malcolm</div></div></body></html>