File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,39 @@ def test_check_env(monkeypatch):
4545 check_env ()
4646
4747
48+ def test_version_info_comparisons ():
49+ """Test _version_info comparison operators with tuples and other instances."""
50+ v3_10 = _version_info (3 , 10 )
51+ v3_9 = _version_info (3 , 9 )
52+ v3_11 = _version_info (3 , 11 )
53+
54+ # Test __eq__ with tuples
55+ assert v3_10 == (3 , 10 )
56+ assert v3_10 != (3 , 9 )
57+ assert v3_9 == (3 , 9 )
58+
59+ # Test __ge__ with tuples
60+ assert v3_10 >= (3 , 10 )
61+ assert v3_10 >= (3 , 9 )
62+ assert not (v3_9 >= (3 , 10 ))
63+ assert v3_11 >= (3 , 10 )
64+
65+ # Test __eq__ with other _version_info instances
66+ assert v3_10 == _version_info (3 , 10 )
67+ assert v3_10 != v3_9
68+ assert v3_10 == v3_10 # Same instance
69+
70+ assert v3_10 != v3_11
71+
72+ # Test __ge__ with other _version_info instances
73+ assert v3_10 >= v3_10
74+ assert v3_10 >= v3_9
75+ assert not (v3_9 >= v3_10 )
76+ assert v3_11 >= v3_10
77+
78+ assert v3_11 >= v3_11 # Same instance
79+
80+
4881@pytest .mark .asyncio
4982async def test_check_dashboard_files_not_exists (monkeypatch ):
5083 """Tests dashboard download when files do not exist."""
You can’t perform that action at this time.
0 commit comments