test_telemetry fails for Python Version 3.11.0rc1 (#2431)

* initial commit

* ruff updated formatting
This commit is contained in:
Yummy-Yums 2024-01-24 20:30:22 +00:00 committed by GitHub
parent ec889c411b
commit 82aca76cd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,8 @@
from packaging.version import parse as parse_python_version
from reflex.utils import telemetry
def versiontuple(v):
return tuple(map(int, (v.split("."))))
def test_telemetry():
"""Test that telemetry is sent correctly."""
# Check that the user OS is one of the supported operating systems.
@ -24,7 +22,7 @@ def test_telemetry():
# Check that the Python version is greater than 3.7.
python_version = telemetry.get_python_version()
assert python_version is not None
assert versiontuple(python_version) >= versiontuple("3.7")
assert parse_python_version(python_version) >= parse_python_version("3.7")
def test_disable():