def test_complains_about_template_without_default(): with pytest.raises(ValueError): msd.SegmentDataSource( name="foo", from_expr="moz-fx-data-shared-prod.{dataset}.foo", ) msd.SegmentDataSource( name="foo", from_expr="moz-fx-data-shared-prod.{dataset}.foo", default_dataset="dataset", )
def test_segment_data_source_window_start_validates(): msd.SegmentDataSource( name="bla", from_expr="bla", window_start=-1, window_end=-1, ) with pytest.raises(ValueError): msd.SegmentDataSource( name="bla", from_expr="bla", window_start=0, window_end=-1, )
def test_segment_data_source_window_end_validates(): msd.SegmentDataSource( name="bla", from_expr="bla", window_start=0, window_end=0, ) msd.SegmentDataSource( name="bla", from_expr="bla", window_start=0, window_end=1, ) msd.SegmentDataSource( name="bla", from_expr="bla", window_start=1, window_end=3, )