From 23b3336c1feb3acb603a935f11e442557d6434f4 Mon Sep 17 00:00:00 2001 From: Elias Dorneles Date: Mon, 25 Jan 2016 22:11:04 -0200 Subject: [PATCH] add test for invalid option --- tests/test_exporters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_exporters.py b/tests/test_exporters.py index 00352f61e..61a0229a4 100644 --- a/tests/test_exporters.py +++ b/tests/test_exporters.py @@ -90,6 +90,10 @@ class PythonItemExporterTest(BaseItemExporterTest): def _get_exporter(self, **kwargs): return PythonItemExporter(binary=False, **kwargs) + def test_invalid_option(self): + with self.assertRaisesRegexp(TypeError, "Unexpected options: invalid_option"): + PythonItemExporter(invalid_option='something') + def test_nested_item(self): i1 = TestItem(name=u'Joseph', age='22') i2 = dict(name=u'Maria', age=i1)