TestCollection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 7 2
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