File: Math.py.test.in

package info (click to toggle)
cdo 2.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,964 kB
  • sloc: cpp: 180,221; ansic: 95,352; sh: 7,292; f90: 6,089; makefile: 1,975; ruby: 1,078; csh: 1,020; python: 995; fortran: 319; pascal: 219; perl: 9
file content (23 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! @PYTHON@
#
from cdoTest import *
#test_module = TestModule()
#
OPERATORS=["abs","int","nint","sqr","sqrt","exp","ln","log10","sin","cos","tan","asin","acos","atan","reci","not"]

IFILE=f'{DATAPATH}/math_data'
FORMAT="-f srv -b 32"
#
test_module = TestModule()
#
for OPER in OPERATORS:
    RFILE=f'{DATAPATH}/math_{OPER}_ref'
    OFILE=f'math_{OPER}_res'

    t=TAPTest(OPER)
    t.add(f'{CDO}  {FORMAT} {OPER} {IFILE} {OFILE}')
    t.add(f'{CDO}  diff,abslim=1.e-6 {OFILE} {RFILE}')
    t.clean(OFILE)
    test_module.add(t)

test_module.run()