File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
medcat-v2/tests/components/addons/meta_cat Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 21
21
def assert_tries_network ():
22
22
real_socket = socket .socket
23
23
calls = []
24
+ print (f"=== DEBUG: Network call interception started on thread { threading .get_ident ()} ===" )
24
25
25
26
def guard (* args , ** kwargs ):
27
+ print (f"=== DEBUG: Network call intercepted on thread { threading .get_ident ()} ===" )
26
28
calls .append ((len (args ), len (kwargs )))
27
29
raise OSError ("Network disabled for test" )
28
30
@@ -62,6 +64,7 @@ def replacement_method(*args, **kwargs):
62
64
yield
63
65
finally :
64
66
transformers .BertModel .from_pretrained = orig_from_pretrained
67
+ print (f"=== DEBUG: from_pretrained called { len (method_calls )} times ===" )
65
68
assert method_calls , "BertModel.from_pretrained should be called"
66
69
67
70
You can’t perform that action at this time.
0 commit comments