def test_lacks_support(bctype, supports_b):
    """should raise an error if the barcode type is not supported."""
    profile = Profile(features={BARCODE_B: supports_b})
    instance = printer.Dummy(profile=profile)
    with pytest.raises(BarcodeTypeError):
        instance.barcode("test", bctype)

    assert instance.output == b""
示例#2
0
 def test_features(self):
     assert Profile(features={'foo': True}).supports('foo')
示例#3
0
 def test_columns(self):
     assert Profile(columns=10).get_columns('sdfasdf') == 10
 def test_features(self):
     assert Profile(features={"foo": True}).supports("foo")