Skip to content

Commit

Permalink
Merge pull request #109 from necaris/fix/failing-tests
Browse files Browse the repository at this point in the history
Update tested Pydantic versions
  • Loading branch information
necaris authored Dec 13, 2024
2 parents ef4dd47 + 1569764 commit 1028eb3
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,30 @@
@session
@parametrize(
"pydantic",
("2.0", "2.1", "2.2", "2.3", "2.4"),
(
(2, 0),
(2, 1),
(2, 2),
(2, 3),
(2, 4),
(2, 5),
(2, 6),
(2, 7),
(2, 8),
(2, 9),
(2, 10),
),
)
@parametrize("graphene", ("2.1.8", "2.1.9", "3.0", "3.1", "3.2", "3.3"))
@parametrize("graphene", ("2.1.8", "2.1.9", "3.0", "3.1", "3.2", "3.3", "3.4"))
def tests(session, pydantic, graphene):
if sys.version_info > (3, 10) and pydantic in ("1.7", "1.8"):
if sys.version_info > (3, 10) and pydantic in ((1, 7), (1, 8)):
return session.skip()
if sys.version_info > (3, 10) and graphene <= "3":
# Graphene 2.x doesn't support Python 3.11
return session.skip()
session.install(f"pydantic=={pydantic}")
if sys.version_info > (3, 11) and pydantic < (2, 9):
return session.skip()
pydantic_version_string = ".".join([str(n) for n in pydantic])
session.install(f"pydantic=={pydantic_version_string}")
session.install(f"graphene=={graphene}")
session.install("pytest", "pytest-cov", ".")
session.run(
Expand Down

0 comments on commit 1028eb3

Please sign in to comment.