Source code for i18next.testing.base

from __future__ import print_function

__title__ = 'i18next.testing.base'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2015 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
__all__ = (
    'PRINT_INFO', 'TRACK_TIME', 'print_info', 'i18next_setup', 'skip',
    'is_i18next_setup_completed', 'mark_i18next_setup_as_completed',
)

PRINT_INFO = True
TRACK_TIME = False


SKIP = False


class I18NextSetup(object):
    """
    Basic setup class in order to avoid the i18next test data
    to be initialised multiple times.
    """
    def __init__(self):
        self.is_done = False

i18next_setup = I18NextSetup()

[docs]def is_i18next_setup_completed(): return i18next_setup.is_done == True
[docs]def mark_i18next_setup_as_completed(): i18next_setup.is_done = True