Lines Matching refs:any2i
542 = Test calls on MultiFlagsField.any2i
562 x = f.any2i(mp, set())
565 x = f.any2i(mp, {'A'})
571 x = f.any2i(mp, {'A', 'B'})
578 x = f.any2i(mp, 3)
585 x = f.any2i(mp, 7)
594 x = f.any2i(mp, {'+', '*'})
602 x = f.any2i(mp, {'A'})
609 x = f.any2i(None, {'Toto'})
777 = EnumField.any2i
780 assert(f.any2i(None, 'Foo') == 0)
781 assert(f.any2i(None, 'Bar') == 1)
782 assert(f.any2i(None, 2) == 2)
783 expect_exception(KeyError, 'f.any2i(None, "Baz")')
784 assert(f.any2i(None, ['Foo', 'Bar', 2]) == [0, 1, 2])
786 assert(rf.any2i(None, 'Foo') == 0)
787 assert(rf.any2i(None, 'Bar') == 1)
788 assert(rf.any2i(None, 2) == 2)
789 expect_exception(KeyError, 'rf.any2i(None, "Baz")')
790 assert(rf.any2i(None, ['Foo', 'Bar', 2]) == [0, 1, 2])
792 assert(lf.any2i(None, 'Foo') == 0)
793 assert(lf.any2i(None, 'Bar') == 1)
794 assert(lf.any2i(None, 2) == 2)
795 expect_exception(KeyError, 'lf.any2i(None, "Baz")')
796 assert(lf.any2i(None, ['Foo', 'Bar', 2]) == [0, 1, 2])
798 assert(fcb.any2i(None, 'Foo') == 0)
799 assert(fcb.any2i(None, 'Bar') == 1)
800 assert(fcb.any2i(None, 5) == 5)
801 expect_exception(ValueError, 'fcb.any2i(None, "Baz")')
802 assert(f.any2i(None, ['Foo', 'Bar', 5]) == [0, 1, 5])