Skip to content

Commit 5436958

Browse files
committed
Fixing tests for PyPy
1 parent b6e7c8d commit 5436958

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

domdf_python_tools/terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def ioctl_GWINSZ(fd):
218218

219219
if not cr:
220220
try:
221-
fd = os.open(os.ctermid(), os.O_RDONLY)
221+
fd = os.open(os.ctermid(), os.O_RDONLY) # type: ignore
222222
cr = ioctl_GWINSZ(fd)
223223
os.close(fd)
224224
except:

tests/test_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# stdlib
1010
import decimal
1111
import pathlib
12+
import platform
1213
import re
1314
import sys
1415
import types
@@ -191,7 +192,7 @@ def __init__(self):
191192

192193

193194
def get_mem_addr(obj):
194-
if sys.platform == "win32":
195+
if sys.platform == "win32" and platform.python_implementation() != "PyPy":
195196
return f"0x0*{hex(id(no_repr_instance))[2:].upper()}"
196197
else:
197198
return f"0x0*{hex(id(no_repr_instance))[2:]}"

0 commit comments

Comments
 (0)