diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-08-06 20:29:29 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-08-06 20:29:29 (GMT) |
| commit | febc3320563bf597e186ebce75abdac2926ceeb6 (patch) | |
| tree | 1360725b7e65af72348ed78687257249ccf1d36e /Lib/test/test_zipimport.py | |
| parent | d73c31899e88aa5a1cc28f288cc70a35f2a196c2 (diff) | |
| download | cpython-febc3320563bf597e186ebce75abdac2926ceeb6.zip cpython-febc3320563bf597e186ebce75abdac2926ceeb6.tar.gz cpython-febc3320563bf597e186ebce75abdac2926ceeb6.tar.bz2 | |
Issue #26754: Undocumented support of general bytes-like objects
as path in compile() and similar functions is now deprecated.
Diffstat (limited to 'Lib/test/test_zipimport.py')
| -rw-r--r-- | Lib/test/test_zipimport.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py index 20491cd..a2482d4 100644 --- a/Lib/test/test_zipimport.py +++ b/Lib/test/test_zipimport.py @@ -629,8 +629,10 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase): zipimport.zipimporter(filename) zipimport.zipimporter(os.fsencode(filename)) - zipimport.zipimporter(bytearray(os.fsencode(filename))) - zipimport.zipimporter(memoryview(os.fsencode(filename))) + with self.assertWarns(DeprecationWarning): + zipimport.zipimporter(bytearray(os.fsencode(filename))) + with self.assertWarns(DeprecationWarning): + zipimport.zipimporter(memoryview(os.fsencode(filename))) @support.requires_zlib |
