Skip to content

Commit 2857d4f

Browse files
committed
updating alias tests and cdl
1 parent 8a64095 commit 2857d4f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/bald/tests/integration/CDL/array_alias_v2.cdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ variables:
1010
int alias_list ;
1111
alias_list:SDN_ParameterDiscoveryCode = "http://vocab.nerc.ac.uk/isoCodelists/sdnCodelists/cdicsrCodeList.xml#SDN_ParameterDiscoveryCode" ;
1212
alias_list:BactTaxaAbundSed = "http://vocab.nerc.ac.uk/collection/P02/current/BAUC/" ;
13-
alias_list:standard_name = "https://def.scitools.org.uk/CFTerms/standard_name" ;
13+
alias_list:standard_name = "http://def.scitools.org.uk/CFTerms/standard_name" ;
1414
alias_list:air_temperature = "http://vocab.nerc.ac.uk/collection/P07/current/CFSN0023/" ;
1515

1616
int parent_variable(pdim0, pdim1) ;

lib/bald/tests/integration/test_cdl_v2.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ def setUp(self):
1515
self.cdl_path = os.path.join(os.path.dirname(__file__), 'CDL')
1616

1717

18+
def test_alias_v2(self):
19+
"""Test alias version 2 style """
20+
with self.temp_filename('.nc') as tfile:
21+
cdl_file = os.path.join(self.cdl_path, 'array_alias_v2.cdl')
22+
print(cdl_file)
23+
subprocess.check_call(['ncgen', '-o', tfile, cdl_file])
24+
validation = bald.validate_netcdf(tfile)
25+
exns = validation.exceptions()
26+
self.assertTrue(validation.is_valid(), msg='{} != []'.format(exns))
27+
28+
setattr(Test, 'test_alias_v2', test_alias_v2)
29+
1830
def test_prefix_v2(self):
1931
"""Test prefix version 2 style """
2032
with self.temp_filename('.nc') as tfile:

0 commit comments

Comments
 (0)