mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
issue5230 store string values of warnings to remotely debug failing python35(win) setup
This commit is contained in:
parent
88ca40a15d
commit
ca2a7a44db
|
@ -90,9 +90,9 @@ objects_to_test = (
|
||||||
def write_obj_and_catch_warnings(obj):
|
def write_obj_and_catch_warnings(obj):
|
||||||
with make_tempdir() as d:
|
with make_tempdir() as d:
|
||||||
with warnings.catch_warnings(record=True) as warnings_list:
|
with warnings.catch_warnings(record=True) as warnings_list:
|
||||||
warnings.filterwarnings("error", category=ResourceWarning)
|
warnings.filterwarnings("always", category=ResourceWarning)
|
||||||
obj.to_disk(d)
|
obj.to_disk(d)
|
||||||
return warnings_list
|
return list(map(lambda w: w.message, warnings_list))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("obj", objects_to_test[0], ids=objects_to_test[1])
|
@pytest.mark.parametrize("obj", objects_to_test[0], ids=objects_to_test[1])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user