Skip to content

Commit

Permalink
Merge pull request #104 from WACCEM/ci_test
Browse files Browse the repository at this point in the history
Updated CI test example.
  • Loading branch information
feng045 authored Feb 26, 2025
2 parents 8a3cea6 + 615ffc3 commit c8252bb
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions tests/test_example.py
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}")

0 comments on commit c8252bb

Please sign in to comment.