Lines Matching refs:i2repr_one

806 = EnumField.i2repr_one
809 assert(f.i2repr_one(None, 0) == 'Foo')
810 assert(f.i2repr_one(None, 1) == 'Bar')
811 expect_exception(KeyError, 'f.i2repr_one(None, 2)')
813 assert(rf.i2repr_one(None, 0) == 'Foo')
814 assert(rf.i2repr_one(None, 1) == 'Bar')
815 expect_exception(KeyError, 'rf.i2repr_one(None, 2)')
817 assert(lf.i2repr_one(None, 0) == 'Foo')
818 assert(lf.i2repr_one(None, 1) == 'Bar')
819 expect_exception(KeyError, 'lf.i2repr_one(None, 2)')
821 assert(fcb.i2repr_one(None, 0) == 'Foo')
822 assert(fcb.i2repr_one(None, 1) == 'Bar')
823 assert(fcb.i2repr_one(None, 5) == 'Bar')
824 assert(fcb.i2repr_one(None, 11) == repr(11))
828 assert(f.i2repr_one(None, 0) == repr(0))
829 assert(f.i2repr_one(None, 1) == repr(1))
830 assert(f.i2repr_one(None, 2) == repr(2))
832 assert(rf.i2repr_one(None, 0) == repr(0))
833 assert(rf.i2repr_one(None, 1) == repr(1))
834 assert(rf.i2repr_one(None, 2) == repr(2))
836 assert(lf.i2repr_one(None, 0) == repr(0))
837 assert(lf.i2repr_one(None, 1) == repr(1))
838 assert(lf.i2repr_one(None, 2) == repr(2))
840 assert(fcb.i2repr_one(None, 0) == repr(0))
841 assert(fcb.i2repr_one(None, 1) == repr(1))
842 assert(fcb.i2repr_one(None, 5) == repr(5))
843 assert(fcb.i2repr_one(None, 11) == repr(11))
847 assert(f.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
848 assert(rf.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
849 assert(lf.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
850 assert(fcb.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
903 assert(f.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
904 assert(rf.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
905 assert(lf.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
906 assert(fcb.i2repr_one(None, RandNum(0, 10)) == '<RandNum>')
975 = XShortEnumField.i2repr_one
978 assert(f.i2repr_one(None, 0) == 'Foo')
979 assert(f.i2repr_one(None, 1) == 'Bar')
980 assert(f.i2repr_one(None, 0xff) == '0xff')
982 assert(f.i2repr_one(None, 0) == 'Foo')
983 assert(f.i2repr_one(None, 1) == 'Bar')
984 assert(f.i2repr_one(None, 0xff) == '0xff')