def test_non(self): assert not all_are([1, "2", "3"], str) assert not all_are([1, [2], "3"], (list, tuple))
def test_equ(self): assert all_are([1, 2, 3], int) assert all_are([(1,), [2], (3, 4)], (list, tuple))
def fromList(self, ring): if not all_are(ring, (str, dict)): raise BudSyntaxError( 'Unsupported mixed {}'.format(RingMaker.NM), RingMaker.KEYS) return ring
def fromList(self, ring): if not all_are(ring, (str, dict)): raise BudSyntaxError('Unsupported mixed {}'.format(RingMaker.NM), RingMaker.KEYS) return ring
def fromList(self, layer): if not all_are(layer, (list, dict)): raise BudSyntaxError( 'Unsupported mixed {}'.format(SliceMaker.NM), SliceMaker.KEYS) return layer