/[escript]/trunk/escriptcore/test/python/test_util_base.py
ViewVC logotype

Diff of /trunk/escriptcore/test/python/test_util_base.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6545 by jfenwick, Fri Mar 24 00:21:35 2017 UTC revision 6546 by jfenwick, Mon Mar 27 00:00:49 2017 UTC
# Line 1513  class Test_util_values(unittest.TestCase Line 1513  class Test_util_values(unittest.TestCase
1513                          pars.append(p)                                    pars.append(p)          
1514          self.execute_binary_params(pars)          self.execute_binary_params(pars)
1515    
1516      def generate_binary_operation_test_batch_large(self, opstring, misccheck, oraclecheck, opname, input_trans=None, minrank=0, maxrank=4, no_shape_mismatch=False, permit_scalar_mismatch=True, cap_combined_rank=False, fix_rank_a=None, fix_rank_b=None, support_cplx=True):      def generate_binary_operation_test_batch_large(self, opstring, misccheck, oraclecheck, opname, input_trans=None, minrank=0, maxrank=4, no_shape_mismatch=False, permit_scalar_mismatch=True, cap_combined_rank=False, fix_rank_a=None, fix_rank_b=None, support_cplx=True, permit_array_op_data=True):
1517          """          """
1518          Generates a set of tests for binary operations.          Generates a set of tests for binary operations.
1519          It is similar to the unary versions but with some unneeded options removed.          It is similar to the unary versions but with some unneeded options removed.
# Line 1524  class Test_util_values(unittest.TestCase Line 1524  class Test_util_values(unittest.TestCase
1524              account for tag additions for tagged data.              account for tag additions for tagged data.
1525              eg:             update1="r2.min()"              eg:             update1="r2.min()"
1526              would result in     rmerge=eval(update1) running after the first tag is calculated              would result in     rmerge=eval(update1) running after the first tag is calculated
1527            Note: permit_array_op_data indicates whether cases with a numpy.ndarray as the first
1528            argument and Data as the second will be generated. (This is to avoid numpy's interpretation of +)
1529          """          """
1530          if input_trans is None:          if input_trans is None:
1531              input_trans=lambda x: x              input_trans=lambda x: x
# Line 1587  class Test_util_values(unittest.TestCase Line 1589  class Test_util_values(unittest.TestCase
1589                              if sa!=sb:                              if sa!=sb:
1590                                  if not permit_scalar_mismatch or (sa!=() and sb!=()):                                  if not permit_scalar_mismatch or (sa!=() and sb!=()):
1591                                     continue                                     continue
1592                            if isinstance(aarg[0][0], numpy.ndarray) and isinstance(barg[0][0], Data) and not permit_array_op_data:
1593                                continue
1594                          p=(aarg[0][0], barg[0][0], opstring, misccheck,                          p=(aarg[0][0], barg[0][0], opstring, misccheck,
1595                             numpy.array(aarg[0][1]), numpy.array(barg[0][1]),                             numpy.array(aarg[0][1]), numpy.array(barg[0][1]),
1596                             oraclecheck, opname+' '+aarg[1]+'/'+barg[1])                             oraclecheck, opname+' '+aarg[1]+'/'+barg[1])

Legend:
Removed from v.6545  
changed lines
  Added in v.6546

  ViewVC Help
Powered by ViewVC 1.1.26