/[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 6544 by jfenwick, Thu Mar 23 06:33:16 2017 UTC revision 6545 by jfenwick, Fri Mar 24 00:21:35 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):      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):
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.
         For example, all operations in this type should accept complex arguments.  
1520          opstring is a string of the operation to be performed (in terms of arguments a and b) eg "inner(a,b)"          opstring is a string of the operation to be performed (in terms of arguments a and b) eg "inner(a,b)"
1521          misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"          misccheck is a string giving a check to be run after the operation eg "isinstance(res,float)"
1522          opname is a string used to describe the operation being tested eg "inner"          opname is a string used to describe the operation being tested eg "inner"
# Line 1529  class Test_util_values(unittest.TestCase Line 1528  class Test_util_values(unittest.TestCase
1528          if input_trans is None:          if input_trans is None:
1529              input_trans=lambda x: x              input_trans=lambda x: x
1530          pars=[]          pars=[]
1531          for ac in (False, True):    # complex or real arguments          if support_cplx:
1532              for bc in (False, True):              complexity=(False, True)
1533            else:
1534                complexity=(False,)
1535            for ac in complexity:    # complex or real arguments
1536                for bc in complexity:
1537                  astr="real" if ac else "complex"                  astr="real" if ac else "complex"
1538                  bstr="real" if bc else "complex"                  bstr="real" if bc else "complex"
1539                  aargset=[]                  aargset=[]

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

  ViewVC Help
Powered by ViewVC 1.1.26