Skip to content

Commit 5117b20

Browse files
committed
fix: name error ReferenceError
1 parent 834e739 commit 5117b20

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

mypyc/test-data/run-weakref.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_weakref_proxy():
6262
with pytest.raises(ReferenceError):
6363
p.some_meth()
6464

65+
[builtins fixtures/exception.pyi]
6566
[file driver.py]
6667
from native import test_weakref_proxy
6768

@@ -88,6 +89,7 @@ def test_weakref_proxy_with_callback():
8889
with pytest.raises(ReferenceError):
8990
p.some_meth()
9091

92+
[builtins fixtures/exception.pyi]
9193
[file driver.py]
9294
from native import test_weakref_proxy_with_callback
9395

test-data/unit/fixtures/exception.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class BaseException:
2222
class Exception(BaseException): pass
2323
class RuntimeError(Exception): pass
2424
class NotImplementedError(RuntimeError): pass
25+
class ReferenceError(Exception): ...
2526

2627
if sys.version_info >= (3, 11):
2728
_BT_co = TypeVar("_BT_co", bound=BaseException, covariant=True)

0 commit comments

Comments
 (0)