Beispiel #1
0
 def setUp(self):
     self.test_pattern_node = shortcuts.parse_pattern(self.test_pattern)
 def setUp(self):
     self.pattern_node = shortcuts.parse_pattern(self.pattern)
Beispiel #3
0
import logging
from functools import partial
import six

from django.utils.translation import ugettext_lazy as _
from julia import node, shortcuts

from . import const
from .utils import Enum

logger = logging.getLogger(__name__)

# aquire a stream pattern node that will live in memory
# and will be available application wide
try:
    stream_pattern_node = shortcuts.parse_pattern(const.STREAM_PATTERN)
except node.PatternNodeError as e:
    logger.error('failed to parse pattern (%s)', e, exc_info=True)
    raise

unmap = partial(shortcuts.unmap, coerce=int)

# Stat categories enum
# SCORE is 0, TIME is 1 and so on
#
# no member should ever be removed
# new members are added at the bottom of the member definition list
STAT = Enum(
    # main stats
    'SCORE',
    'TIME',  # dont count time played in coop
Beispiel #4
0
from functools import partial
import six

from django.utils.translation import ugettext_lazy as _
from julia import node, shortcuts

from . import const
from .utils import Enum


logger = logging.getLogger(__name__)

# aquire a stream pattern node that will live in memory 
# and will be available application wide
try:
    stream_pattern_node = shortcuts.parse_pattern(const.STREAM_PATTERN)
except node.PatternNodeError as e:
    logger.error('failed to parse pattern (%s)', e, exc_info=True)
    raise

unmap = partial(shortcuts.unmap, coerce=int)

# Stat categories enum
# SCORE is 0, TIME is 1 and so on
#
# no member should ever be removed
# new members are added at the bottom of the member definition list
STAT = Enum(
    # main stats
    'SCORE',
    'TIME',  # dont count time played in coop