Skip to content

Commit c4024c5

Browse files
committed
Skipping part of test in 3.11
1 parent 173ae49 commit c4024c5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/test_database.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
22

33
import pytest
4+
from packaging import version
45

56
from arangoasync.collection import StandardCollection
67
from arangoasync.exceptions import (
@@ -22,7 +23,7 @@
2223

2324

2425
@pytest.mark.asyncio
25-
async def test_database_misc_methods(sys_db, db, bad_db, cluster):
26+
async def test_database_misc_methods(sys_db, db, bad_db, cluster, db_version):
2627
# Status
2728
status = await sys_db.status()
2829
assert status["server"] == "arango"
@@ -51,16 +52,17 @@ async def test_database_misc_methods(sys_db, db, bad_db, cluster):
5152
await bad_db.reload_jwt_secrets()
5253

5354
# Version
54-
version = await sys_db.version()
55-
assert version["version"].startswith("3.")
55+
v = await sys_db.version()
56+
assert v["version"].startswith("3.")
5657
with pytest.raises(ServerVersionError):
5758
await bad_db.version()
5859

5960
# key generators
60-
key_generators = await db.key_generators()
61-
assert isinstance(key_generators, list)
62-
with pytest.raises(CollectionKeyGeneratorsError):
63-
await bad_db.key_generators()
61+
if db_version >= version.parse("3.12.0"):
62+
key_generators = await db.key_generators()
63+
assert isinstance(key_generators, list)
64+
with pytest.raises(CollectionKeyGeneratorsError):
65+
await bad_db.key_generators()
6466

6567

6668
@pytest.mark.asyncio

0 commit comments

Comments
 (0)