def test_enums(value): try: e = cairo.Antialias(value) except OverflowError: pass else: assert e == value
def test_pickle(): # These constants used to be plain int. Try to pickle to int so that # there is no dependency on pycairo when unpickling. value = cairo.Antialias(42) new_value = pickle.loads(pickle.dumps(value)) assert type(new_value) == int