Skip to content

Commit 23b3336

Browse files
committed
add test for invalid option
1 parent 0c44fac commit 23b3336

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_exporters.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ class PythonItemExporterTest(BaseItemExporterTest):
9090
def _get_exporter(self, **kwargs):
9191
return PythonItemExporter(binary=False, **kwargs)
9292

93+
def test_invalid_option(self):
94+
with self.assertRaisesRegexp(TypeError, "Unexpected options: invalid_option"):
95+
PythonItemExporter(invalid_option='something')
96+
9397
def test_nested_item(self):
9498
i1 = TestItem(name=u'Joseph', age='22')
9599
i2 = dict(name=u'Maria', age=i1)

0 commit comments

Comments
 (0)