Skip to content

Commit a110d69

Browse files
committed
Add missing lazy argument to unit tests
1 parent 1f5362e commit a110d69

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

imas/test/test_nc_validation.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def memfile_with_ids(memfile, factory):
3232
IDS2NC(ids, memfile).run()
3333
# This one is valid:
3434
ids = factory.core_profiles()
35-
NC2IDS(memfile, ids, ids.metadata, None).run()
35+
NC2IDS(memfile, ids, ids.metadata, None).run(lazy=False)
3636
return memfile
3737

3838

@@ -65,61 +65,61 @@ def test_invalid_units(memfile_with_ids, factory):
6565
memfile_with_ids["time"].units = "hours"
6666
ids = factory.core_profiles()
6767
with pytest.raises(InvalidNetCDFEntry):
68-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
68+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
6969

7070

7171
def test_invalid_documentation(memfile_with_ids, factory, caplog):
7272
ids = factory.core_profiles()
7373
with caplog.at_level("WARNING"):
74-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
74+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
7575
assert not caplog.records
7676
# Invalid docstring logs a warning
7777
memfile_with_ids["time"].documentation = "https://en.wikipedia.org/wiki/Time"
7878
with caplog.at_level("WARNING"):
79-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
79+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
8080
assert len(caplog.records) == 1
8181

8282

8383
def test_invalid_dimension_name(memfile_with_ids, factory):
8484
memfile_with_ids.renameDimension("time", "T")
8585
ids = factory.core_profiles()
8686
with pytest.raises(InvalidNetCDFEntry):
87-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
87+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
8888

8989

9090
def test_invalid_coordinates(memfile_with_ids, factory):
9191
memfile_with_ids["profiles_1d.grid.rho_tor_norm"].coordinates = "xyz"
9292
ids = factory.core_profiles()
9393
with pytest.raises(InvalidNetCDFEntry):
94-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
94+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
9595

9696

9797
def test_invalid_ancillary_variables(memfile_with_ids, factory):
9898
memfile_with_ids["time"].ancillary_variables = "xyz"
9999
ids = factory.core_profiles()
100100
with pytest.raises(InvalidNetCDFEntry):
101-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
101+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
102102

103103

104104
def test_extra_attributes(memfile_with_ids, factory):
105105
memfile_with_ids["time"].new_attribute = [1, 2, 3]
106106
ids = factory.core_profiles()
107107
with pytest.raises(InvalidNetCDFEntry):
108-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
108+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
109109

110110

111111
def test_shape_array_without_data(memfile_with_ids, factory):
112112
memfile_with_ids.createVariable("profiles_1d.t_i_average:shape", int, ())
113113
ids = factory.core_profiles()
114114
with pytest.raises(InvalidNetCDFEntry):
115-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
115+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
116116

117117

118118
def test_shape_array_without_sparse_data(memfile_with_ids, factory):
119119
memfile_with_ids.createVariable("profiles_1d.grid.rho_tor_norm:shape", int, ())
120120
ids = factory.core_profiles()
121121
with pytest.raises(InvalidNetCDFEntry):
122-
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run()
122+
NC2IDS(memfile_with_ids, ids, ids.metadata, None).run(lazy=False)
123123

124124

125125
def test_shape_array_with_invalid_dimensions(memfile_with_ids, factory):
@@ -137,7 +137,7 @@ def test_shape_array_with_invalid_dimensions(memfile_with_ids, factory):
137137
("time", "profiles_1d.grid.rho_tor_norm:i"),
138138
)
139139
with pytest.raises(InvalidNetCDFEntry):
140-
NC2IDS(memfile_with_ids, cp, cp.metadata, None).run()
140+
NC2IDS(memfile_with_ids, cp, cp.metadata, None).run(lazy=False)
141141

142142

143143
def test_shape_array_with_invalid_dtype(memfile_with_ids, factory):
@@ -153,7 +153,7 @@ def test_shape_array_with_invalid_dtype(memfile_with_ids, factory):
153153
"profiles_1d.t_i_average:shape", float, ("time", "1D")
154154
)
155155
with pytest.raises(InvalidNetCDFEntry):
156-
NC2IDS(memfile_with_ids, cp, cp.metadata, None).run()
156+
NC2IDS(memfile_with_ids, cp, cp.metadata, None).run(lazy=False)
157157

158158

159159
def test_validate_nc(tmpdir):

0 commit comments

Comments
 (0)