mirror of https://github.com/mvt-project/mvt.git
Compare commits
2 Commits
051b1cb6bc
...
035f857b9b
Author | SHA1 | Date |
---|---|---|
Rory Flynn | 035f857b9b | |
Rory Flynn | 59e6dff1e1 |
|
@ -40,7 +40,9 @@ jobs:
|
|||
- name: Safety checks
|
||||
run: safety check
|
||||
- name: Test with pytest and coverage
|
||||
run: pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=mvt tests/ | tee pytest-coverage.txt
|
||||
run: |
|
||||
set -o pipefail
|
||||
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=mvt tests/ | tee pytest-coverage.txt
|
||||
- name: Pytest coverage comment
|
||||
continue-on-error: true # Workflows running on a fork can't post comments
|
||||
uses: MishaKav/pytest-coverage-comment@main
|
||||
|
|
|
@ -59,13 +59,10 @@ def convert_datetime_to_iso(date_time: datetime.datetime) -> str:
|
|||
:rtype: str
|
||||
|
||||
"""
|
||||
try:
|
||||
if date_time.tzinfo:
|
||||
# Timezone aware object - convert to UTC
|
||||
date_time = date_time.astimezone(tz=datetime.UTC)
|
||||
return date_time.strftime("%Y-%m-%d %H:%M:%S.%f")
|
||||
except Exception:
|
||||
return ""
|
||||
if date_time.tzinfo:
|
||||
# Timezone aware object - convert to UTC
|
||||
date_time = date_time.astimezone(tz=datetime.timezone.utc)
|
||||
return date_time.strftime("%Y-%m-%d %H:%M:%S.%f")
|
||||
|
||||
|
||||
def convert_unix_to_utc_datetime(
|
||||
|
|
Loading…
Reference in New Issue