Skip to content

Commit

Permalink
Reformat.
Browse files Browse the repository at this point in the history
  • Loading branch information
alxmrs committed Mar 24, 2024
1 parent 8468b06 commit e5aff06
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions xarray_sql/df_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ def rand_wx(start: str, end: str) -> xr.Dataset:
temperature = 15 + 8 * np.random.randn(720, 1440, len(time), len(level))
precipitation = 10 * np.random.rand(720, 1440, len(time), len(level))
return xr.Dataset(
data_vars=dict(
temperature=(['lat', 'lon', 'time', 'level'], temperature),
precipitation=(['lat', 'lon', 'time', 'level'], precipitation),
),
coords=dict(
lat=lat,
lon=lon,
time=time,
level=level,
reference_time=reference_time,
),
attrs=dict(description='Random weather.')
data_vars=dict(
temperature=(['lat', 'lon', 'time', 'level'], temperature),
precipitation=(['lat', 'lon', 'time', 'level'], precipitation),
),
coords=dict(
lat=lat,
lon=lon,
time=time,
level=level,
reference_time=reference_time,
),
attrs=dict(description='Random weather.'),
)


Expand Down Expand Up @@ -115,7 +115,11 @@ def test_column_metadata_preserved(self):
try:
_ = read_xarray(self.randwx, chunks=dict(time=24)).compute()
except ValueError as e:
if 'The columns in the computed data do not match the columns in the provided metadata' in str(e):
if (
'The columns in the computed data do not match the columns in the'
' provided metadata'
in str(e)
):
self.fail('Column metadata is incorrect.')


Expand Down

0 comments on commit e5aff06

Please sign in to comment.