On Oct 14, 2010, at 09:34 AM, georg.brandl wrote:

>Author: georg.brandl
>Date: Thu Oct 14 09:34:56 2010
>New Revision: 85463
>
>Log:
>Better check for "any optimize option given".
>
>Modified:
>   python/branches/py3k/Lib/test/test_import.py
>
>Modified: python/branches/py3k/Lib/test/test_import.py
>==============================================================================
>--- python/branches/py3k/Lib/test/test_import.py       (original)
>+++ python/branches/py3k/Lib/test/test_import.py       Thu Oct 14 09:34:56 2010
>@@ -521,7 +521,7 @@
>         self.assertTrue(os.path.exists('__pycache__'))
>         self.assertTrue(os.path.exists(os.path.join(
>             '__pycache__', '{}.{}.py{}'.format(
>-            TESTFN, self.tag, sys.flags.optimize and 'o' or 'c'))))
>+            TESTFN, self.tag, __debug__ and 'c' or 'o'))))

You might want to use imp.cache_from_source() instead for consistency.

> 
>     @unittest.skipUnless(os.name == 'posix',
>                          "test meaningful only on posix systems")

-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to