Пример #1
0
    def setUp(self):
        if sys.version_info[0] >= 3:
            # tell unittest not to warn about running processes
            warnings.simplefilter('ignore', ResourceWarning)  # pylint: disable=no-member,undefined-variable

        self.backend = get_test_backend_name()
        self.test_manager = TestManager()
Пример #2
0
def aiida_profile():
    """Set up AiiDA test profile for the duration of the tests.

    Note: scope='session' limits this fixture to run once per session. Thanks to ``autouse=True``, you don't actually
     need to depend on it explicitly - it will activate as soon as you import it in your ``conftest.py``.
    """
    with test_manager(backend=get_test_backend_name(),
                      profile_name=get_test_profile_name()) as manager:
        yield manager
Пример #3
0
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved.                     #
# This file is part of the AiiDA code.                                    #
#                                                                         #
# The code is hosted on GitHub at https://github.com/aiidateam/aiida-core #
# For further information on the license, see the LICENSE.txt file        #
# For further information please visit http://www.aiida.net               #
###########################################################################
"""Configuration file for pytest tests."""

from aiida.backends import BACKEND_SQLA
from aiida.manage.tests import get_test_backend_name

if get_test_backend_name() != BACKEND_SQLA:
    collect_ignore_glob = ['*']  # pylint: disable=invalid-name
Пример #4
0
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved.                     #
# This file is part of the AiiDA code.                                    #
#                                                                         #
# The code is hosted on GitHub at https://github.com/aiidateam/aiida-core #
# For further information on the license, see the LICENSE.txt file        #
# For further information please visit http://www.aiida.net               #
###########################################################################
"""Configuration file for pytest tests."""

from aiida.backends import BACKEND_DJANGO
from aiida.manage.tests import get_test_backend_name

if get_test_backend_name() != BACKEND_DJANGO:
    collect_ignore_glob = ['*']  # pylint: disable=invalid-name