def test_version(major, minor, patch, raises=True):
     version_to_check = '.'.join([str(v) for v in [major, minor, patch]])
     if raises:
         warning_text = (
             'The schema version of the saved Woodwork table '
             '%s is no longer supported by this version '
             'of woodwork. Attempting to load Woodwork table ...' %
             (version_to_check))
         with pytest.warns(OutdatedSchemaWarning, match=warning_text):
             deserialize._check_schema_version(version_to_check)
     else:
         with pytest.warns(None) as record:
             deserialize._check_schema_version(version_to_check)
         assert len(record) == 0
 def test_version(major, minor, patch, raises=True):
     version_to_check = '.'.join([str(v) for v in [major, minor, patch]])
     if raises:
         warning_text = (
             'The schema version of the saved Woodwork table '
             '%s is greater than the latest supported %s. '
             'You may need to upgrade woodwork. Attempting to load Woodwork table ...'
             % (version_to_check, serialize.SCHEMA_VERSION))
         with pytest.warns(UpgradeSchemaWarning, match=warning_text):
             deserialize._check_schema_version(version_to_check)
     else:
         with pytest.warns(None) as record:
             deserialize._check_schema_version(version_to_check)
         assert len(record) == 0