def autogenerate(cls):
     test_flags = ['fastmath', ]  # TODO: add 'auto_parallel' ?
     # generate all the combinations of the flags
     test_flags = sum([list(combinations(test_flags, x)) for x in range( \
                                                 len(test_flags)+1)], [])
     flag_list = []  # create Flag class instances
     for ft in test_flags:
         flags = Flags()
         flags.set('nrt')
         flags.set('error_model', 'numpy')
         flags.__name__ = '_'.join(ft+('usecase',))
         for f in ft:
             flags.set(f)
         flag_list.append(flags)
     # main loop covering all the modes and use-cases
     for dtype in ('complex64', 'float64', 'float32', 'int32', ):
         for vlen in vlen2cpu:
             for flags in flag_list:
                 for mode in "scalar", "range", "prange", "numpy":
                     cls._inject_test(dtype, mode, vlen, flags)
     # mark important
     if sys.version_info[0] > 2:
         for n in ( "test_int32_range4_usecase",  # issue #3016
                   ):
             setattr(cls, n, tag("important")(getattr(cls, n)))
Пример #2
0
 def autogenerate(cls):
     test_flags = ['fastmath', ]  # TODO: add 'auto_parallel' ?
     # generate all the combinations of the flags
     test_flags = sum([list(combinations(test_flags, x)) for x in range( \
                                                 len(test_flags)+1)], [])
     flag_list = []  # create Flag class instances
     for ft in test_flags:
         flags = Flags()
         flags.set('nrt')
         flags.set('error_model', 'numpy')
         flags.__name__ = '_'.join(ft+('usecase',))
         for f in ft:
             flags.set(f)
         flag_list.append(flags)
     # main loop covering all the modes and use-cases
     for dtype in ('float64', 'float32'):
         for vlen in vlen2cpu:
             for flags in flag_list:
                 for mode in "scalar", "range", "prange", "numpy":
                     cls._inject_test(dtype, mode, vlen, flags)