Lines Matching refs:i2repr

696 = Test calls on MultiFlagsField.i2repr
716 x = f.i2repr(mp, {'A', 'B'})
720 x = f.i2repr(mp, {'*', '+', 'bit 2'})
854 = EnumField.i2repr
857 assert(f.i2repr(None, 0) == 'Foo')
858 assert(f.i2repr(None, 1) == 'Bar')
859 expect_exception(KeyError, 'f.i2repr(None, 2)')
860 assert(f.i2repr(None, [0, 1]) == ['Foo', 'Bar'])
862 assert(rf.i2repr(None, 0) == 'Foo')
863 assert(rf.i2repr(None, 1) == 'Bar')
864 expect_exception(KeyError, 'rf.i2repr(None, 2)')
865 assert(rf.i2repr(None, [0, 1]) == ['Foo', 'Bar'])
867 assert(lf.i2repr(None, 0) == 'Foo')
868 assert(lf.i2repr(None, 1) == 'Bar')
869 expect_exception(KeyError, 'lf.i2repr(None, 2)')
870 assert(lf.i2repr(None, [0, 1]) == ['Foo', 'Bar'])
872 assert(fcb.i2repr(None, 0) == 'Foo')
873 assert(fcb.i2repr(None, 1) == 'Bar')
874 assert(fcb.i2repr(None, 5) == 'Bar')
875 assert(fcb.i2repr(None, 11) == repr(11))
876 assert(fcb.i2repr(None, [0, 1, 5, 11]) == ['Foo', 'Bar', 'Bar', repr(11)])
880 assert(f.i2repr(None, 0) == repr(0))
881 assert(f.i2repr(None, 1) == repr(1))
882 assert(f.i2repr(None, 2) == repr(2))
883 assert(f.i2repr(None, [0, 1, 2]) == [repr(0), repr(1), repr(2)])
885 assert(rf.i2repr(None, 0) == repr(0))
886 assert(rf.i2repr(None, 1) == repr(1))
887 assert(rf.i2repr(None, 2) == repr(2))
888 assert(rf.i2repr(None, [0, 1, 2]) == [repr(0), repr(1), repr(2)])
890 assert(lf.i2repr(None, 0) == repr(0))
891 assert(lf.i2repr(None, 1) == repr(1))
892 assert(lf.i2repr(None, 2) == repr(2))
893 assert(lf.i2repr(None, [0, 1, 2]) == [repr(0), repr(1), repr(2)])
895 assert(fcb.i2repr(None, 0) == repr(0))
896 assert(fcb.i2repr(None, 1) == repr(1))
897 assert(fcb.i2repr(None, 5) == repr(5))
898 assert(fcb.i2repr(None, 11) == repr(11))
899 assert(fcb.i2repr(None, [0, 1, 5, 11]) == [repr(0), repr(1), repr(5), repr(11)])