Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
Signed-off-by: Adam.Dybbroe <a000680@c21856.ad.smhi.se>
  • Loading branch information
Adam.Dybbroe committed Jul 13, 2023
1 parent dce4106 commit 02ac292
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion activefires_pp/tests/test_fires_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def test_regional_fires_filtering(setup_comm, get_config, gethostname):
mymask_file = "/my/shape/file/with/polygons/to/filter/out"

afpp = ActiveFiresPostprocessing(myconfigfile, myborders_file, mymask_file)
afpp._initialize_fire_detection_id()

fstream = io.StringIO(TEST_ACTIVE_FIRES_FILE_DATA)
afdata = pd.read_csv(fstream, index_col=None, header=None, comment='#', names=COL_NAMES)
Expand All @@ -253,6 +254,8 @@ def test_regional_fires_filtering(setup_comm, get_config, gethostname):
afdata['starttime'] = np.repeat(starttime, len(afdata)).astype(np.datetime64)
afdata['endtime'] = np.repeat(endtime, len(afdata)).astype(np.datetime64)

afdata = afpp.add_unique_day_id(afdata)

# Add metadata to the pandas dataframe:
fake_metadata = {'platform': 'j01',
'start_time': datetime(2021, 4, 14, 11, 26, 43, 900000),
Expand Down Expand Up @@ -374,7 +377,6 @@ def test_get_feature_collection_from_firedata(readdata, setup_comm,
mymask_file = "/my/shape/file/with/polygons/to/filter/out"

afpp = ActiveFiresPostprocessing(myconfigfile, myborders_file, mymask_file)
# afpp._fire_detection_id = {'date': datetime(2023, 6, 17, 11, 55, 0), 'counter': 1}
afpp._initialize_fire_detection_id()

myfilepath = TEST_ACTIVE_FIRES_FILEPATH2
Expand Down

0 comments on commit 02ac292

Please sign in to comment.