MCPcopy
hub / github.com/quantopian/zipline / test_lookup_generic

Method test_lookup_generic

tests/test_assets.py:825–838  ·  view source on GitHub ↗

Ensure that lookup_generic works with various permutations of inputs.

(self)

Source from the content-addressed store, hash-verified

823 self.assertEqual(str(e.exception), expected_error_msg)
824
825 def test_lookup_generic(self):
826 """
827 Ensure that lookup_generic works with various permutations of inputs.
828 """
829 cases = build_lookup_generic_cases()
830 # Make sure we clean up temp resources in the generator if we don't
831 # consume the whole thing because of a failure.
832 self.add_instance_callback(cases.close)
833 for finder, inputs, reference_date, country, expected in cases:
834 results, missing = finder.lookup_generic(
835 inputs, reference_date, country,
836 )
837 self.assertEqual(results, expected)
838 self.assertEqual(missing, [])
839
840 def test_lookup_none_raises(self):
841 """

Callers

nothing calls this directly

Calls 3

add_instance_callbackMethod · 0.80
lookup_genericMethod · 0.80

Tested by

no test coverage detected