test_telemetry fails for Python Version 3.11.0rc1 (#2431)
* initial commit * ruff updated formatting
This commit is contained in:
parent
ec889c411b
commit
82aca76cd3
@ -1,10 +1,8 @@
|
|||||||
|
from packaging.version import parse as parse_python_version
|
||||||
|
|
||||||
from reflex.utils import telemetry
|
from reflex.utils import telemetry
|
||||||
|
|
||||||
|
|
||||||
def versiontuple(v):
|
|
||||||
return tuple(map(int, (v.split("."))))
|
|
||||||
|
|
||||||
|
|
||||||
def test_telemetry():
|
def test_telemetry():
|
||||||
"""Test that telemetry is sent correctly."""
|
"""Test that telemetry is sent correctly."""
|
||||||
# Check that the user OS is one of the supported operating systems.
|
# 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.
|
# Check that the Python version is greater than 3.7.
|
||||||
python_version = telemetry.get_python_version()
|
python_version = telemetry.get_python_version()
|
||||||
assert python_version is not None
|
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():
|
def test_disable():
|
||||||
|
Loading…
Reference in New Issue
Block a user