Skip to content

Commit

Permalink
Fix Future and syntax warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fre171csiro committed Aug 5, 2024
1 parent 6fc8c9d commit 94f6648
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pybomwater/bom_water.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def init_properties(self):
offerings = getCap_json['sos:Capabilities']['sos:contents']['sos:Contents']['swes:offering']
for off in offerings:
proc = os.path.basename(off['sos:ObservationOffering']['swes:procedure'])
proc = re.sub('\W+', '_', proc)
proc = re.sub(r'\W+', '_', proc)
self.procedures.set_value(proc, proc)

'''Features'''
Expand All @@ -115,7 +115,7 @@ def init_properties(self):
long_statioId = getfeature_json['features'][index]['properties']['long_name']

name = getfeature_json['features'][index]['properties']['name']
name = re.sub('\W+', '_', name)
name = re.sub(r'\W+', '_', name)
# stationId = getfeature_json['stationID']stationID
self.features.set_value(name, long_statioId)

Expand Down
2 changes: 1 addition & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_parse_get_data(self):
assert (ts.Interpolation == "Continuous").all(), "Interpolation not continuous"
assert len(ts.dims) == 1

qual = xr.CFTimeIndex.value_counts(ts.Quality)
qual = xr.CFTimeIndex.value_counts(ts.Quality.values)
assert qual[90] == 1075
assert qual[10] == 295
assert qual[110] == 172
Expand Down

0 comments on commit 94f6648

Please sign in to comment.