From 6df858e7ebea8ca6c4992d27ffc6fe9cd5ad090c Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Thu, 7 Aug 2014 08:05:22 -0400 Subject: [PATCH] Rename tests directory for nosetests. Remove cruft test Java stub classes. --- setup.py | 2 +- test/game/AmericanGameTest.java | 40 ----------------- test/game/GameLogicTest.java | 37 --------------- test/game/GameStateTest.java | 67 ---------------------------- test/game/InternationalGameTest.java | 41 ----------------- test/game/__init__.py | 0 {test => tests}/__Init__.py | 0 tests/game/__init__.py | 2 + 8 files changed, 3 insertions(+), 186 deletions(-) delete mode 100644 test/game/AmericanGameTest.java delete mode 100644 test/game/GameLogicTest.java delete mode 100644 test/game/GameStateTest.java delete mode 100644 test/game/InternationalGameTest.java delete mode 100644 test/game/__init__.py rename {test => tests}/__Init__.py (100%) create mode 100644 tests/game/__init__.py diff --git a/setup.py b/setup.py index 2f79e78..c1781b5 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ setup( 'web': gather_requirements('requirements/web.txt'), }, - packages=find_packages(exclude=['test']), + packages=find_packages(exclude=['tests']), include_package_data=True, entry_points={ diff --git a/test/game/AmericanGameTest.java b/test/game/AmericanGameTest.java deleted file mode 100644 index 45db1b8..0000000 --- a/test/game/AmericanGameTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/***************************************************************************** - AmericanGameTest.java -- Regression test of a game played according to - American rules. - ***************************************************************************** - - ***************************************************************************** - This file is part of justCheckers. - - justCheckers is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - justCheckers is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with justCheckers. If not, see . - *****************************************************************************/ - -package org.justcheckers.test.game; - -/** - * Regression test for a game of checkers played according to American rules. - * American rules are: - * - 8x8 board. - * - Pawns can only move 1 space forward. - * - Kings can move 1 space forward or backwards. - * - The game ends when one player is eliminated or completely blocked. - * - * TestNG version: 5.10 - * - * @author Dorian Pula - * - */ -public class AmericanGameTest { - //TODO: Populate with test cases. -} diff --git a/test/game/GameLogicTest.java b/test/game/GameLogicTest.java deleted file mode 100644 index 496d655..0000000 --- a/test/game/GameLogicTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/***************************************************************************** - GameLogicTest.java -- Unit tests related to the game engine. - ***************************************************************************** - - ***************************************************************************** - This file is part of justCheckers. - - justCheckers is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - justCheckers is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with justCheckers. If not, see . - *****************************************************************************/ - -package org.justcheckers.test.game; - -/** - * Test the game engine logic. Tests if the game engine can manipulate the - * state of a game and its board, in accordance to the rules of the game. The - * set of rule change from variant to variant. These tests should check basic - * correctness of the game engine. - * - * TestNG version: 5.10 - * - * @author Dorian Pula - * - */ -public class GameLogicTest { - //TODO: Populate with test cases. -} diff --git a/test/game/GameStateTest.java b/test/game/GameStateTest.java deleted file mode 100644 index aba3663..0000000 --- a/test/game/GameStateTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************************** - GameStateTest.java -- Unit tests related to managing a game's state. - ***************************************************************************** - - ***************************************************************************** - This file is part of justCheckers. - - justCheckers is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - justCheckers is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with justCheckers. If not, see . - *****************************************************************************/ - -package org.justcheckers.test.game; - -import org.justcheckers.game.Game; -import org.justcheckers.game.Rulebook; -import org.testng.Assert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** - * Test the game state logic. Tests the NQPOJO (not quite plain old Java - * objects) that handle the state of a game. This includes the Rulebook - * (that dictate what rules will be used for a game), the Board (that represents - * the state of the board, pieces, etc.) and the Game itself. - * - * TestNG version: 5.10 - * - * @author dorianpula - */ -public class GameStateTest { - - /** A test game of checkers. */ - private Game testGame; - - /** - * Sets up a rather plain game of checkers. Game is based on the American - * rules, to make life easier. - */ - @BeforeClass - public void setUp() { - this.testGame = new Game(); - } - - /** - * Test the rulebook of a default initialized game. - */ - @Test - public void testDefaultRulebookSetup() { - Rulebook testRules = this.testGame.getGameRules(); - - Assert.assertNull(testRules); - - //TODO: Test the ruleset that is gets initialized properly. - } - - //TODO: Populate with test cases. -} diff --git a/test/game/InternationalGameTest.java b/test/game/InternationalGameTest.java deleted file mode 100644 index 28c5883..0000000 --- a/test/game/InternationalGameTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/***************************************************************************** - InternationalGameTest.java -- Regression test of a game played according to - International rules. - ***************************************************************************** - - ***************************************************************************** - This file is part of justCheckers. - - justCheckers is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - justCheckers is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with justCheckers. If not, see . - *****************************************************************************/ - -package org.justcheckers.test.game; - -/** - * Regression test for a game of checkers played according to International - * rules. - * International rules are: - * - 10x10 board. - * - Pawns can move 1 space forward. - * - Kings can move 1 space forward. But can capture backwards. - * - The game ends when one player is eliminated or completely blocked. - * - * TestNG version: 5.10 - * - * @author Dorian Pula - * - */ -public class InternationalGameTest { - //TODO: Populate with test cases. -} diff --git a/test/game/__init__.py b/test/game/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test/__Init__.py b/tests/__Init__.py similarity index 100% rename from test/__Init__.py rename to tests/__Init__.py diff --git a/tests/game/__init__.py b/tests/game/__init__.py new file mode 100644 index 0000000..5e7e4d4 --- /dev/null +++ b/tests/game/__init__.py @@ -0,0 +1,2 @@ +# TODO: Write full integration tests that mimic a full game of checkers of each variant. +# e.g. American, International, Polish...