зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1471622 - Fix mozfile's test_extract.py under Python 3.5; r=davehunt
MozReview-Commit-ID: 5c8SoMMpv70 --HG-- extra : rebase_source : 65717f1f056d43588b4df59ea765a7ec2e2657c0
This commit is contained in:
Родитель
67e3369c94
Коммит
79eaf1fafd
|
@ -1,7 +1,6 @@
|
|||
[DEFAULT]
|
||||
subsuite = mozbase, os == "linux"
|
||||
[test_extract.py]
|
||||
skip-if = python == 3
|
||||
[test_load.py]
|
||||
skip-if = python == 3
|
||||
[test_move_remove.py]
|
||||
|
|
|
@ -112,14 +112,16 @@ class TestExtract(unittest.TestCase):
|
|||
os.write(fd, b'This is not a zipfile or tarball')
|
||||
os.close(fd)
|
||||
exception = None
|
||||
|
||||
try:
|
||||
dest = tempfile.mkdtemp()
|
||||
mozfile.extract(filename, dest)
|
||||
except Exception as exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
exception = exc
|
||||
finally:
|
||||
os.remove(filename)
|
||||
os.rmdir(dest)
|
||||
|
||||
self.assertTrue(isinstance(exception, Exception))
|
||||
|
||||
# utility functions
|
||||
|
|
Загрузка…
Ссылка в новой задаче