Merge pull request #1280 from quantopian/bad-pipeline-columns

BUG: Fail fast on invalid pipeline columns
This commit is contained in:
Scott Sanderson
2016-06-22 18:44:40 -04:00
committed by GitHub
2 changed files with 21 additions and 1 deletions
+6
View File
@@ -63,6 +63,9 @@ class PipelineTestCase(TestCase):
with self.assertRaises(TypeError):
Pipeline({}, SomeFactor())
with self.assertRaises(TypeError):
Pipeline({'open': USEquityPricing.open})
Pipeline({}, SomeFactor() > 5)
def test_add(self):
@@ -78,6 +81,9 @@ class PipelineTestCase(TestCase):
with self.assertRaises(TypeError):
p.add(f, 1)
with self.assertRaises(TypeError):
p.add(USEquityPricing.open, 'open')
def test_overwrite(self):
p = Pipeline()
f = SomeFactor()