Did I find the right examples for you? yes no

All Samples(38)  |  Call(38)  |  Derive(0)  |  Import(0)

src/d/a/datagristle-0.56/gristle/tests/test_location_slicer.py   datagristle(Download)
    def test_spec_validation(self):
 
        # pylint: disable=E1101
        with pytest.raises(ValueError):
            mod.SpecProcessor( '3', 'bad spec')
        with pytest.raises(ValueError):
            mod.SpecProcessor( '3', 'bad spec')
    def test_negative_check(self):
        # check simplest spec
        self.spec_processor = mod.SpecProcessor(['3'], 'rec_incl_spec')
        assert self.spec_processor.has_negatives is False
 
        # check more complex spec
        sp2 = mod.SpecProcessor(['3:5','0','18:',':'], 'rec_incl_spec')
 
        # check negative spec
        sp2 = mod.SpecProcessor(['3:5'], 'rec_incl_spec')
        sp3 = mod.SpecProcessor(['-1'], 'rec_incl_spec')
        assert sp3.has_negatives

src/d/a/DataGristle-HEAD/gristle/tests/test_location_slicer.py   DataGristle(Download)
    def test_spec_validation(self):
 
        # pylint: disable=E1101
        with pytest.raises(ValueError):
            mod.SpecProcessor( '3', 'bad spec')
        with pytest.raises(ValueError):
            mod.SpecProcessor( '3', 'bad spec')
    def test_negative_check(self):
        # check simplest spec
        self.spec_processor = mod.SpecProcessor(['3'], 'rec_incl_spec')
        assert self.spec_processor.has_negatives is False
 
        # check more complex spec
        sp2 = mod.SpecProcessor(['3:5','0','18:',':'], 'rec_incl_spec')
 
        # check negative spec
        sp2 = mod.SpecProcessor(['3:5'], 'rec_incl_spec')
        sp3 = mod.SpecProcessor(['-1'], 'rec_incl_spec')
        assert sp3.has_negatives