From 602f9ebc933827e0f3bfa34189d835cae7a70ce3 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Fri, 26 Jul 2019 00:04:07 +0300 Subject: [PATCH] add missing attribute. See https://github.com/shlomif/PySolFC/issues/129 . --- pysollib/game/__init__.py | 1 + scripts/gen_individual_importing_tests.py | 1 + tests/lib/pysol_tests/game_drag.py | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 tests/lib/pysol_tests/game_drag.py diff --git a/pysollib/game/__init__.py b/pysollib/game/__init__.py index 96ac3385..903ac41d 100644 --- a/pysollib/game/__init__.py +++ b/pysollib/game/__init__.py @@ -347,6 +347,7 @@ class GameDrag(NewStruct): cards = attr.ib(factory=list) canshade_stacks = attr.ib(factory=list) noshade_stacks = attr.ib(factory=list) + shadows = attr.ib(factory=list) class Game(object): diff --git a/scripts/gen_individual_importing_tests.py b/scripts/gen_individual_importing_tests.py index 9b9f48f4..c1289574 100644 --- a/scripts/gen_individual_importing_tests.py +++ b/scripts/gen_individual_importing_tests.py @@ -37,6 +37,7 @@ print('ok 1 - imported') for ver in PY_VERS: for mod in [ 'pysol_tests.acard_unit', + 'pysol_tests.game_drag', 'pysol_tests.hint', 'pysol_tests.import_file1', 'pysol_tests.latin1_conv_unit', diff --git a/tests/lib/pysol_tests/game_drag.py b/tests/lib/pysol_tests/game_drag.py new file mode 100644 index 00000000..ec976232 --- /dev/null +++ b/tests/lib/pysol_tests/game_drag.py @@ -0,0 +1,12 @@ +# Written by Shlomi Fish, under the MIT Expat License. + +import unittest + +from pysollib.game import GameDrag + + +class MyTests(unittest.TestCase): + def test_shadows(self): + d = GameDrag() + d.shadows.append("test") + self.assertTrue(len(d.shadows))