Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Parsons committed Mar 13, 2024
1 parent 4db7236 commit f278f89
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions woodwork/tests/accessor/test_serialization.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os
import shutil
import warnings
from pathlib import Path
from unittest.mock import patch

Expand Down Expand Up @@ -1042,9 +1043,9 @@ def test_version(major, minor, patch, raises=True):
with pytest.warns(UpgradeSchemaWarning, match=warning_text):
_check_schema_version(version_to_check)
else:
with pytest.warns(None) as record:
with warnings.catch_warnings():
warnings.simplefilter("error")
_check_schema_version(version_to_check)
assert len(record) == 0

major, minor, patch = [int(s) for s in SCHEMA_VERSION.split(".")]

Expand All @@ -1067,9 +1068,9 @@ def test_version(major, minor, patch, raises=True):
with pytest.warns(OutdatedSchemaWarning, match=warning_text):
_check_schema_version(version_to_check)
else:
with pytest.warns(None) as record:
with warnings.catch_warnings():
warnings.simplefilter("error")
_check_schema_version(version_to_check)
assert len(record) == 0

major, minor, patch = [int(s) for s in SCHEMA_VERSION.split(".")]

Expand Down

0 comments on commit f278f89

Please sign in to comment.