[python-win32] Creating a list of stress tests for unit tests involving files
I'm working on a set of unit tests designed to stress test some file handling capabilities of our application. 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. UNITTEST_DRIVE_NOT_READY = r'a:' UNITTEST_DRIVE_READ_ONLY = r'g:' # CD drive with CD UNITTEST_UNC_NOT_EXIST = r'\\unc_not_exist' UNITTEST_FILE_BAD_CHARS = r'path_bad_chars_*|' UNITTEST_FILE_NO_WRITE = r'c:\program files' UNITTEST_FILE_NOT_EXIST = r'\path_not_exist' UNITTEST_FILE_LOCKED = r'file_locked.tmp' unittest_file_locked = open( UNITTEST_FILE_LOCKED, 'w' ) UNITTEST_UNICODE_PATH= ur'\xunicode_test_\xb0_\xb1_' Thank you, Malcolm ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32
Re: [python-win32] Creating a list of stress tests for unit tests involving files
On 6/9/2010 2:30 PM, pyt...@bdurham.com wrote: I'm working on a set of unit tests designed to stress test some file handling capabilities of our application. ... UNITTEST_UNICODE_PATH = ur'\xunicode_test_\xb0_\xb1_' That string consists of nothing but ordinary ASCII characters (in part, because of the r). Were you trying to include some real Unicode outside of the ASCII subset? If so, then maybe something like this: UNITTEST_UNICODE_PATH = uU\u00F1i\u00E7\u03B8de That's Uñiçθde, which is a valid Windows file name. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32