Skip to content

Commit

Permalink
Use VARIANTS from variants.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gbtami committed Jan 12, 2025
1 parent 3557e3d commit 95cfc49
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from mongomock_motor import AsyncMongoMockClient

import game
from const import CREATED, VARIANTS, STALEMATE, MATE
from const import CREATED, STALEMATE, MATE
from fairy import FairyBoard
from game import Game
from bug.game_bug import GameBug
Expand All @@ -23,6 +23,7 @@
from utils import sanitize_fen
from pychess_global_app_state_utils import get_app_state
from logger import handler
from variants import VARIANTS

game.KEEP_TIME = 0
game.MAX_PLY = 120
Expand Down
2 changes: 1 addition & 1 deletion tests/test_960_rematch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from mongomock_motor import AsyncMongoMockClient

import game
from const import VARIANTS
from game import Game
from glicko2.glicko2 import DEFAULT_PERF
from seek import Seek
Expand All @@ -18,6 +17,7 @@
from pychess_global_app_state_utils import get_app_state
from newid import id8
from logger import handler
from variants import VARIANTS

game.KEEP_TIME = 0
game.MAX_PLY = 120
Expand Down
2 changes: 1 addition & 1 deletion tests/test_auto_pairing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from seek import Seek
from user import User
from pychess_global_app_state_utils import get_app_state
from const import VARIANTS
from glicko2.glicko2 import DEFAULT_PERF
from auto_pair import (
add_to_auto_pairings,
Expand All @@ -19,6 +18,7 @@
find_matching_user_for_seek,
)
from logger import handler
from variants import VARIANTS

logging.getLogger().removeHandler(handler)

Expand Down
3 changes: 2 additions & 1 deletion tests/test_corr_janggi_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from aiohttp.test_utils import AioHTTPTestCase
from mongomock_motor import AsyncMongoMockClient

from const import VARIANTS, STARTED
from const import STARTED
from glicko2.glicko2 import DEFAULT_PERF
from seek import Seek
from server import make_app
Expand All @@ -15,6 +15,7 @@
from utils import join_seek, load_game
from pychess_global_app_state_utils import get_app_state
from newid import id8
from variants import VARIANTS

logging.basicConfig()
logging.getLogger().setLevel(level=logging.ERROR)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_game_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

from mongomock_motor import AsyncMongoMockClient

from const import STARTED, VARIANTS
from const import STARTED
from game import Game
from glicko2.glicko2 import DEFAULT_PERF
from newid import id8
from server import make_app
from user import User
from utils import insert_game_to_db
from pychess_global_app_state_utils import get_app_state
from variants import VARIANTS

DEFAULT_PERFS = {variant: DEFAULT_PERF for variant in VARIANTS}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_tournament.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from const import (
BYEGAME,
STARTED,
VARIANTS,
ARENA,
RR,
SWISS,
Expand All @@ -34,6 +33,7 @@
from user import User
from utils import play_move
from logger import handler
from variants import VARIANTS

import logging

Expand Down

0 comments on commit 95cfc49

Please sign in to comment.