TestCollection.__init__()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
1
from synergine.synergy.collection.SynergyCollection import SynergyCollection
2
from tests.src.event.TooMuchBeansAction import TooMuchBeansAction
3
from tests.src.event.MakeBeansProfitAction import MakeBeansProfitAction
4
from tests.src.event.LonelinessSuicideAction import LonelinessSuicideAction
5
from tests.src.cst import COL_COMPUTABLE
6
from tests.src.event.LonelinessSuicideAction import LonelinessSuicideAction
7
from synergine.core.Signals import Signals
8
9
class TestCollection(SynergyCollection):
10
11
    def __init__(self, configuration):
12
        super().__init__(configuration)
13
        self._actions = [MakeBeansProfitAction, TooMuchBeansAction, LonelinessSuicideAction]
14
15
        # hack; to prevent cycle import bug:
16
        Signals.signal(LonelinessSuicideAction).connect(lambda obj, context: \
17
            context.metas.collections.remove(obj.get_id(), COL_COMPUTABLE))
18