Skip to content

Commit ea7400d

Browse files
committed
tidy
1 parent 665f9e4 commit ea7400d

File tree

2 files changed

+6
-53
lines changed

2 files changed

+6
-53
lines changed

lib/bald/tests/integration/test_cdl.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -28,49 +28,3 @@ def atest(self):
2828
self.assertTrue(validation.is_valid(), msg='{} != []'.format(exns))
2929
return atest
3030
setattr(Test, 'test_{}'.format(file_id), make_a_test(cdl_file))
31-
32-
33-
# def test_ereefs_gbr4_ncld(self):
34-
# """Override ereefs test with currently accepted failures"""
35-
# with self.temp_filename('.nc') as tfile:
36-
# cdl_file = os.path.join(self.cdl_path, 'ereefs_gbr4_ncld.cdl')
37-
# subprocess.check_call(['ncgen', '-o', tfile, cdl_file])
38-
# validation = bald.validate_netcdf(tfile, cache=self.acache)
39-
# exns = validation.exceptions()
40-
# exns.sort()
41-
# # expected = ['http://qudt.org/vocab/unit#Meter is not resolving as a resource (404).',
42-
# # 'http://qudt.org/vocab/unit#MeterPerSecond is not resolving as a resource (404).',
43-
# # 'http://qudt.org/vocab/unit#MeterPerSecond is not resolving as a resource (404).',
44-
# # 'http://qudt.org/vocab/unit#DegreeCelsius is not resolving as a resource (404).']
45-
# # expected.sort()
46-
# # self.assertTrue(not validation.is_valid() and exns == expected,
47-
# # msg='{} \n!= \n{}'.format(exns, expected))
48-
# self.assertTrue(not validation.is_valid())
49-
50-
# setattr(Test, 'test_ereefs_gbr4_ncld', test_ereefs_gbr4_ncld)
51-
52-
53-
# def test_ProcessChain0300(self):
54-
# """Override ProcessChain 0300 test with currently accepted failures"""
55-
# self.assertTrue(True)
56-
57-
# setattr(Test, 'test_ProcessChain0300', test_ProcessChain0300)
58-
59-
60-
# def test_grid_OISST_GHRSST(self):
61-
# """Override grid OISST GHRSST test with currently accepted failures"""
62-
# with self.temp_filename('.nc') as tfile:
63-
# cdl_file = os.path.join(self.cdl_path, 'grid_OISST_GHRSST.cdl')
64-
# subprocess.check_call(['ncgen', '-o', tfile, cdl_file])
65-
# validation = bald.validate_netcdf(tfile, cache=self.acache)
66-
# exns = validation.exceptions()
67-
# self.assertTrue(validation.is_valid(), msg='{} != []'.format(exns))
68-
# # exns.sort()
69-
# # expected = ['http://doi.org/10.7289/V5SQ8XB5 is not resolving as a resource (404).',
70-
# # 'http://www.ncdc.noaa.gov/sst is not resolving as a resource (404).',
71-
# # 'http://www.ncdc.noaa.gov/sst/ is not resolving as a resource (404).']
72-
# # expected.sort()
73-
# # self.assertTrue(not validation.is_valid() and exns == expected,
74-
# # msg='{} \n!= \n{}'.format(exns, expected))
75-
76-
# setattr(Test, 'test_grid_OISST_GHRSST', test_grid_OISST_GHRSST)

lib/bald/tests/integration/test_netcdf.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,13 @@ def test_invalid_uri(self):
4949
f = _fattrs(f)
5050
setattr(f, 'bald__turtle', 'bald__walnut')
5151
f.close()
52-
validation = bald.validate_netcdf(tfile, cache=self.acache)
52+
validation = bald.validate_netcdf(tfile, cache=self.acache,
53+
uris_resolve=True)
5354
exns = validation.exceptions()
54-
self.assertTrue(validation.is_valid(), msg='{} != []'.format(exns))
55-
# expected = ['http://binary-array-ld.net/latest/turtle is not resolving as a resource (404).',
56-
# 'http://binary-array-ld.net/latest/walnut is not resolving as a resource (404).']
57-
# self.assertTrue((not validation.is_valid()) and exns == expected,
58-
# msg='{} != {}'.format(exns, expected))
59-
55+
expected = ['http://binary-array-ld.net/latest/turtle is not resolving as a resource (404).',
56+
'http://binary-array-ld.net/latest/walnut is not resolving as a resource (404).']
57+
self.assertTrue((not validation.is_valid()) and exns == expected,
58+
msg='{} != {}'.format(exns, expected))
6059

6160
class TestArrayReference(BaldTestCase):
6261
def test_match(self):

0 commit comments

Comments
 (0)