mirror of https://github.com/mvt-project/mvt.git
Compare commits
3 Commits
f1821d1a02
...
cbd41b2aff
Author | SHA1 | Date |
---|---|---|
Rory Flynn | cbd41b2aff | |
Rory Flynn | 0509eaa162 | |
Rory Flynn | 59e6dff1e1 |
|
@ -40,7 +40,9 @@ jobs:
|
||||||
- name: Safety checks
|
- name: Safety checks
|
||||||
run: safety check
|
run: safety check
|
||||||
- name: Test with pytest and coverage
|
- 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
|
- name: Pytest coverage comment
|
||||||
continue-on-error: true # Workflows running on a fork can't post comments
|
continue-on-error: true # Workflows running on a fork can't post comments
|
||||||
uses: MishaKav/pytest-coverage-comment@main
|
uses: MishaKav/pytest-coverage-comment@main
|
||||||
|
|
|
@ -59,13 +59,10 @@ def convert_datetime_to_iso(date_time: datetime.datetime) -> str:
|
||||||
:rtype: str
|
:rtype: str
|
||||||
|
|
||||||
"""
|
"""
|
||||||
try:
|
if date_time.tzinfo:
|
||||||
if date_time.tzinfo:
|
# Timezone aware object - convert to UTC
|
||||||
# Timezone aware object - convert to UTC
|
date_time = date_time.astimezone(tz=datetime.timezone.utc)
|
||||||
date_time = date_time.astimezone(tz=datetime.UTC)
|
return date_time.strftime("%Y-%m-%d %H:%M:%S.%f")
|
||||||
return date_time.strftime("%Y-%m-%d %H:%M:%S.%f")
|
|
||||||
except Exception:
|
|
||||||
return ""
|
|
||||||
|
|
||||||
|
|
||||||
def convert_unix_to_utc_datetime(
|
def convert_unix_to_utc_datetime(
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
# Use of this software is governed by the MVT License 1.1 that can be found at
|
# Use of this software is governed by the MVT License 1.1 that can be found at
|
||||||
# https://license.mvt.re/1.1/
|
# https://license.mvt.re/1.1/
|
||||||
|
|
||||||
MVT_VERSION = "2.5.2"
|
MVT_VERSION = "2.5.3"
|
||||||
|
|
Loading…
Reference in New Issue