Skip to content

Commit

Permalink
change formatting for tests to remove zero padding from datetime form…
Browse files Browse the repository at this point in the history
…atting because %2H properly formats a datetime with 2 characters on Linux but results in 2H for Mac even when using the same version of Python
  • Loading branch information
georgemccabe committed Oct 30, 2023
1 parent 4c463eb commit 03f2cfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_find_obs_offset(metplus_config, offsets, expected_file, offset_seconds)

pcw.c_dict['OFFSETS'] = offsets
pcw.c_dict['OBS_INPUT_DIR'] = get_data_dir(pcw.config)
pcw.c_dict['OBS_INPUT_TEMPLATE'] = "{da_init?fmt=%2H}z.prepbufr.tm{offset?fmt=%2H}.{da_init?fmt=%Y%m%d}"
pcw.c_dict['OBS_INPUT_TEMPLATE'] = "{da_init?fmt=%H}z.prepbufr.tm{offset?fmt=%2H}.{da_init?fmt=%Y%m%d}"
add_field_info_to_time_info(time_info, var_info)
obs_file, time_info = pcw.find_obs_offset(time_info)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def test_pb2nc_all_fields(metplus_config, config_overrides,
'{PARM_BASE}/met_config/PB2NCConfig_wrapped')
config.set('config', 'PB2NC_INPUT_DIR', input_dir)
config.set('config', 'PB2NC_INPUT_TEMPLATE',
'ndas.t{da_init?fmt=%2H}z.prepbufr.tm{offset?fmt=%2H}.{da_init?fmt=%Y%m%d}.nr')
'ndas.t{da_init?fmt=%H}z.prepbufr.tm{offset?fmt=%2H}.{da_init?fmt=%Y%m%d}.nr')
config.set('config', 'PB2NC_OUTPUT_DIR',
'{OUTPUT_BASE}/PB2NC/output')
config.set('config', 'PB2NC_OUTPUT_TEMPLATE', '{valid?fmt=%Y%m%d%H}.nc')
Expand Down

0 comments on commit 03f2cfc

Please sign in to comment.