mirror of https://github.com/ecmwf/eccodes.git
Add test for ECC-866
This commit is contained in:
parent
8ac92e3189
commit
6fece32386
|
@ -12,7 +12,6 @@
|
|||
#
|
||||
# Description: how to read values of different type of keys from GTS messages.
|
||||
#
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
import traceback
|
||||
|
@ -37,6 +36,7 @@ def example():
|
|||
if gid is None:
|
||||
break
|
||||
|
||||
cnt += 1
|
||||
print("message: %s" % cnt)
|
||||
|
||||
# ---------------------------------------------
|
||||
|
@ -50,8 +50,6 @@ def example():
|
|||
except CodesInternalError as err:
|
||||
print('Error with key="%s" : %s' % (key, err.msg))
|
||||
|
||||
cnt += 1
|
||||
|
||||
# delete handle
|
||||
codes_release(gid)
|
||||
|
||||
|
|
|
@ -11,19 +11,20 @@
|
|||
. ./include.sh
|
||||
|
||||
|
||||
#Define a common label for all the tmp files
|
||||
# Define a common label for all the tmp files
|
||||
label="gts_get_keys_test_p"
|
||||
|
||||
#Define tmp file
|
||||
# Define tmp file
|
||||
fTmp=${label}.tmp.txt
|
||||
rm -f $fTmp | true
|
||||
rm -f $fTmp
|
||||
|
||||
REDIRECT=/dev/null
|
||||
# Write the key values into a file
|
||||
$PYTHON $examples_src/gts_get_keys.py > $fTmp
|
||||
|
||||
#Write the key values into a file
|
||||
$PYTHON $examples_src/gts_get_keys.py 2> $REDIRECT > $fTmp
|
||||
|
||||
#TODO: check the results
|
||||
# Check the results
|
||||
grep -q "message: 300" $fTmp
|
||||
c=`grep -c "CCCC: KWBC" $fTmp`
|
||||
[ $c -eq 211 ]
|
||||
|
||||
#Clean up
|
||||
rm -f $fTmp | true
|
||||
rm -f $fTmp
|
||||
|
|
Loading…
Reference in New Issue