Skip to content

Commit

Permalink
tests for gridded class
Browse files Browse the repository at this point in the history
  • Loading branch information
hgloeckner committed Aug 17, 2024
1 parent 8d466e7 commit f6cfaec
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_gridded.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import pytest
import os
import xarray as xr
from halodrops.processor import Gridded

sondes = None
flight_id = "20240811"
platform_id = "HALO"
l3_default = f"{platform_id}_{flight_id}_Level_3.nc"
l3_template = "{flight_id}_{platform}_Level_3.nc"


@pytest.fixture
def gridded():
return Gridded(sondes, flight_id=flight_id, platform_id=platform_id)


def test_l3_default(gridded):
gridded.get_l3_filename()
assert gridded.l3_filename == l3_default


def test_l3_template(gridded):
gridded.get_l3_filename(l3_filename_template=l3_template)
assert gridded.l3_filename == l3_template.format(
flight_id=flight_id, platform=platform_id
)

0 comments on commit f6cfaec

Please sign in to comment.