-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from WACCEM/ci_test
Updated CI test example.
- Loading branch information
Showing
1 changed file
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
from pyflextrkr.ft_utilities import get_basetime_from_string | ||
# import numpy as np | ||
# from pyflextrkr.ft_utilities import get_basetime_from_string | ||
|
||
# Date-string format: 'yyyymodd.hhmm' | ||
datestring = "20250101.1200" | ||
print(f"Date string {datestring}") | ||
|
||
# Convert a date-string to Epoch time | ||
base_time = get_basetime_from_string(datestring) | ||
print(f"Epoch time for date-string {datestring}: {base_time}") | ||
# Basic test to check the date format | ||
def test_datestring_format(): | ||
assert len(datestring) == 13, "Date string length should be 13" | ||
assert datestring[8] == '.', "Date string should have a dot at position 9" | ||
assert datestring[:8].isdigit(), "Date part should be digits" | ||
assert datestring[9:].isdigit(), "Time part should be digits" | ||
|
||
# Placeholder for future numpy tests | ||
def test_numpy_placeholder(): | ||
assert True # To make pytest happy | ||
|
||
# # Convert a date-string to Epoch time | ||
# base_time = get_basetime_from_string(datestring) | ||
# print(f"Epoch time for date-string {datestring}: {base_time}") |