Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 19a43f5

Browse filesBrowse files
committed
fix more tests
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
1 parent 04d7ab5 commit 19a43f5
Copy full SHA for 19a43f5

File tree

10 files changed

+681
-519
lines changed
Filter options

10 files changed

+681
-519
lines changed

‎Lib/tarfile.py

Copy file name to clipboardExpand all lines: Lib/tarfile.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ def __init__(self, name, mode, comptype, fileobj, bufsize,
392392

393393
elif comptype == "xz":
394394
try:
395-
import lzma
395+
# TODO: RUSTPYTHON remove underscore
396+
import lzma_
396397
except ImportError:
397398
raise CompressionError("lzma module is not available") from None
398399
if mode == "r":
@@ -1923,7 +1924,8 @@ def xzopen(cls, name, mode="r", fileobj=None, preset=None, **kwargs):
19231924
raise ValueError("mode must be 'r', 'w' or 'x'")
19241925

19251926
try:
1926-
from lzma import LZMAFile, LZMAError
1927+
# TODO: RUSTPYTHON remove underscore
1928+
from lzma_ import LZMAFile, LZMAError
19271929
except ImportError:
19281930
raise CompressionError("lzma module is not available") from None
19291931

‎Lib/test/support/__init__.py

Copy file name to clipboardExpand all lines: Lib/test/support/__init__.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,12 @@ def requires_bz2(reason='requires bz2'):
494494
return unittest.skipUnless(bz2, reason)
495495

496496
def requires_lzma(reason='requires lzma'):
497-
try:
498-
import lzma
499-
except ImportError:
500-
lzma = None
497+
# try:
498+
# import lzma
499+
# except ImportError:
500+
# lzma = None
501+
# TODO: RUSTPYTHON
502+
lzma = None
501503
return unittest.skipUnless(lzma, reason)
502504

503505
def has_no_debug_ranges():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.