projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Save player mode.
[naja.git]
/
naja
/
tests
/
test_actions.py
diff --git
a/naja/tests/test_actions.py
b/naja/tests/test_actions.py
index 891936799d4ab0827bf9aeeb5c6a781e321a3a2b..d770f12397f04ffec487192ba299a8445f51a3a1 100644
(file)
--- a/
naja/tests/test_actions.py
+++ b/
naja/tests/test_actions.py
@@
-2,11
+2,15
@@
from unittest import TestCase
from naja.constants import BITS, MOVES
from naja.gameboard import GameBoard, LocationCard
from naja.constants import BITS, MOVES
from naja.gameboard import GameBoard, LocationCard
+from naja.options import parse_args
from naja.player import Player
from naja import actions
class TestActions(TestCase):
from naja.player import Player
from naja import actions
class TestActions(TestCase):
+ def setUp(self):
+ parse_args([])
+
def make_player(self, *bits):
player_bits = 0
for bit in bits:
def make_player(self, *bits):
player_bits = 0
for bit in bits:
@@
-16,7
+20,7
@@
class TestActions(TestCase):
def make_board(self, player_bits=None, locations=None):
if locations is None:
locations = [{'actions': []}]
def make_board(self, player_bits=None, locations=None):
if locations is None:
locations = [{'actions': []}]
- board = GameBoard.new_game(
locations
)
+ board = GameBoard.new_game(
{'cards': locations}
)
if player_bits is not None:
board.player.bits.bits = 0
board.player.bits.set_bits(player_bits)
if player_bits is not None:
board.player.bits.bits = 0
board.player.bits.set_bits(player_bits)