BUG: Fail when passing two Filters to set_screen.

This commit is contained in:
Scott Sanderson
2015-10-07 10:48:42 -04:00
parent bf6dc7fac1
commit e728e0c1f3
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -119,3 +119,12 @@ class PipelineTestCase(TestCase):
p.set_screen(g, overwrite=True)
self.assertEqual(p.screen, g)
with self.assertRaises(TypeError) as e:
p.set_screen(f, g)
message = e.exception.args[0]
self.assertIn(
"expected a value of type bool or int for argument 'overwrite'",
message,
)
+1 -1
View File
@@ -103,7 +103,7 @@ class Pipeline(object):
"""
return self.columns.pop(name)
@expect_types(screen=Filter)
@expect_types(screen=Filter, overwrite=(bool, int))
def set_screen(self, screen, overwrite=False):
"""
Set a screen on this Pipeline.