code: def test_error(self):
      window_length = 1
      polyorder = 3
      mode = "incorrect"
      error_text = "polyorder must be less than window_length."
      with raises(ValueError, match=error_text):
          self.primitive(window_length, polyorder)
  
      error_text = "Both window_length and polyorder must be defined if you define one."
  
      with raises(ValueError, match=error_text):
          self.primitive(window_length=window_length)
      with raises(ValueError, match=error_text):
          self.primitive(polyorder=polyorder)
      error_text = "mode must be 'mirror', 'constant', 'nearest', 'wrap' or 'interp'."
      with raises(ValueError, match=error_text):
          self.primitive(
              window_length=window_length,
              polyorder=polyorder,
              mode=mode,
          )
  
file_path: featuretools/featuretools/tests/primitive_tests/transform_primitive_tests/test_savgol_filter.py
imports: from math import floor
  import numpy
  import pandas
  from pytest import raises
  from featuretools.primitives import SavgolFilter
  from featuretools.tests.primitive_tests.utils import PrimitiveTestBase, find_applicable_primitives, valid_dfs
label_desc: Use image node_id 1 for calling the TestSavgolFilter obj's underlying member method code with example usage: obj.test_error() without return types