From b735c39c5684fa5585de9092208a1967878c2d19 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sun, 5 Nov 2023 20:53:10 -0500 Subject: [PATCH] Add Python 3.12 compatibility (#7) --- setup.py | 1 + tests/test_arena.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 79a5dea..7527d2a 100644 --- a/setup.py +++ b/setup.py @@ -70,6 +70,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Typing :: Typed", ], zip_safe=False, diff --git a/tests/test_arena.py b/tests/test_arena.py index 5034f78..a735ed8 100644 --- a/tests/test_arena.py +++ b/tests/test_arena.py @@ -1,3 +1,4 @@ +import math from typing import List, Tuple from neofoodclub.nfc import NeoFoodClub @@ -25,11 +26,11 @@ def test_first_arena_pirate_ids(nfc: NeoFoodClub) -> None: def test_first_arena_odds(nfc: NeoFoodClub) -> None: - assert nfc.arenas[0].odds == 1.11025641025641 + assert math.isclose(nfc.arenas[0].odds, 1.1102564102564103) def test_first_arena_ratio(nfc: NeoFoodClub) -> None: - assert nfc.arenas[0].ratio == -0.09930715935334855 + assert math.isclose(nfc.arenas[0].ratio, -0.09930715935334877) def test_first_arena_negative(nfc: NeoFoodClub) -> None: