Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56fafe3

Browse files
committed
fixed construct_removed_class domain reload test case
it should not be possible to construct an instance of a class that has been unloaded
1 parent 84db670 commit 56fafe3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/domain_tests/TestRunner.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -770,12 +770,12 @@ def before_reload():
770770
sys.my_cls = TestNamespace.Before
771771
772772
def after_reload():
773+
try:
773774
bar = sys.my_cls()
774-
775-
# Don't crash!
776-
print(bar)
777-
print(bar.__str__())
778-
print(bar.__repr__())
775+
except TypeError:
776+
print('Caught expected exception')
777+
else:
778+
raise AssertionError('Failed to throw exception')
779779
",
780780
},
781781

0 commit comments

Comments
 (0)