From b02b84204adc8d2d45df799c1576b84274c37ca9 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 24 Aug 2021 16:03:24 -0700 Subject: [PATCH] merels: Add missing __init__.py, and really fix the tests. Signed-off-by: Anders Kaseorg --- zulip_bots/zulip_bots/bots/merels/__init__.py | 0 zulip_bots/zulip_bots/bots/merels/merels.py | 3 ++- zulip_bots/zulip_bots/bots/merels/test/test_constants.py | 2 +- zulip_bots/zulip_bots/bots/merels/test/test_database.py | 4 ++-- zulip_bots/zulip_bots/bots/merels/test/test_game.py | 4 ++-- zulip_bots/zulip_bots/bots/merels/test/test_interface.py | 2 +- zulip_bots/zulip_bots/bots/merels/test/test_mechanics.py | 4 ++-- zulip_bots/zulip_bots/bots/merels/test_merels.py | 4 ++-- 8 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 zulip_bots/zulip_bots/bots/merels/__init__.py diff --git a/zulip_bots/zulip_bots/bots/merels/__init__.py b/zulip_bots/zulip_bots/bots/merels/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/zulip_bots/zulip_bots/bots/merels/merels.py b/zulip_bots/zulip_bots/bots/merels/merels.py index e40832e..1bae9f4 100644 --- a/zulip_bots/zulip_bots/bots/merels/merels.py +++ b/zulip_bots/zulip_bots/bots/merels/merels.py @@ -1,8 +1,9 @@ from typing import Any, List -from zulip_bots.bots.merels.libraries import database, game, game_data, mechanics from zulip_bots.game_handler import GameAdapter, SamePlayerMove +from .libraries import database, game, game_data, mechanics + class Storage: data = {} diff --git a/zulip_bots/zulip_bots/bots/merels/test/test_constants.py b/zulip_bots/zulip_bots/bots/merels/test/test_constants.py index 62a3b13..56cd379 100644 --- a/zulip_bots/zulip_bots/bots/merels/test/test_constants.py +++ b/zulip_bots/zulip_bots/bots/merels/test/test_constants.py @@ -1,6 +1,6 @@ import unittest -from libraries import constants +from ..libraries import constants class CheckIntegrity(unittest.TestCase): diff --git a/zulip_bots/zulip_bots/bots/merels/test/test_database.py b/zulip_bots/zulip_bots/bots/merels/test/test_database.py index 8a7cfa1..9023217 100644 --- a/zulip_bots/zulip_bots/bots/merels/test/test_database.py +++ b/zulip_bots/zulip_bots/bots/merels/test/test_database.py @@ -1,8 +1,8 @@ -from libraries import database, game_data - from zulip_bots.simple_lib import SimpleStorage from zulip_bots.test_lib import BotTestCase, DefaultTests +from ..libraries import database, game_data + class DatabaseTest(BotTestCase, DefaultTests): bot_name = "merels" diff --git a/zulip_bots/zulip_bots/bots/merels/test/test_game.py b/zulip_bots/zulip_bots/bots/merels/test/test_game.py index 31b4164..6d1f4ca 100644 --- a/zulip_bots/zulip_bots/bots/merels/test/test_game.py +++ b/zulip_bots/zulip_bots/bots/merels/test/test_game.py @@ -1,10 +1,10 @@ import unittest -from libraries import database, game - from zulip_bots.game_handler import BadMoveException from zulip_bots.simple_lib import SimpleStorage +from ..libraries import database, game + class GameTest(unittest.TestCase): def setUp(self): diff --git a/zulip_bots/zulip_bots/bots/merels/test/test_interface.py b/zulip_bots/zulip_bots/bots/merels/test/test_interface.py index cf6e3d5..6b5440b 100644 --- a/zulip_bots/zulip_bots/bots/merels/test/test_interface.py +++ b/zulip_bots/zulip_bots/bots/merels/test/test_interface.py @@ -1,6 +1,6 @@ import unittest -from libraries import interface +from ..libraries import interface class BoardLayoutTest(unittest.TestCase): diff --git a/zulip_bots/zulip_bots/bots/merels/test/test_mechanics.py b/zulip_bots/zulip_bots/bots/merels/test/test_mechanics.py index e8ab014..872063a 100644 --- a/zulip_bots/zulip_bots/bots/merels/test/test_mechanics.py +++ b/zulip_bots/zulip_bots/bots/merels/test/test_mechanics.py @@ -1,9 +1,9 @@ import unittest -from libraries import database, game_data, interface, mechanics - from zulip_bots.simple_lib import SimpleStorage +from ..libraries import database, game_data, interface, mechanics + class GridTest(unittest.TestCase): def test_out_of_grid(self): diff --git a/zulip_bots/zulip_bots/bots/merels/test_merels.py b/zulip_bots/zulip_bots/bots/merels/test_merels.py index c64d86f..eefe8b0 100644 --- a/zulip_bots/zulip_bots/bots/merels/test_merels.py +++ b/zulip_bots/zulip_bots/bots/merels/test_merels.py @@ -1,10 +1,10 @@ from typing import Any, List, Tuple -from libraries.constants import EMPTY_BOARD - from zulip_bots.game_handler import GameInstance from zulip_bots.test_lib import BotTestCase, DefaultTests +from .libraries.constants import EMPTY_BOARD + class TestMerelsBot(BotTestCase, DefaultTests): bot_name = "merels"