##// END OF EJS Templates
docs: updated release notes for 5.0.0
docs: updated release notes for 5.0.0

File last commit:

r5100:21ffe335 default
r5345:0e08b689 v5.0.0 stable
Show More
conftest.py
57 lines | 1.9 KiB | text/x-python | PythonLexer
copyrights: updated for 2023
r5088 # Copyright (C) 2010-2023 RhodeCode GmbH
tests: move conftests to top level for better pytest test collection
r5015 #
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3
# (only), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This program is dual-licensed. If you wish to learn more about the
# RhodeCode Enterprise Edition, including its added features, Support services,
# and proprietary license terms, please see https://rhodecode.com/licenses/
tests: fixed all tests for python3 BIG changes
r5087 import pytest # noqa
# keep the imports to have a toplevel conftest.py but still importable from EE edition
from rhodecode.tests.conftest_common import ( # noqa
pytest_generate_tests,
pytest_runtest_makereport,
pytest_addoption
)
tests: move conftests to top level for better pytest test collection
r5015
pytest_plugins = [
"rhodecode.tests.fixture_mods.fixture_pyramid",
"rhodecode.tests.fixture_mods.fixture_utils",
]
def pytest_configure(config):
tests: fixed all tests for python3 BIG changes
r5087 from rhodecode.config import patches # noqa
tests: move conftests to top level for better pytest test collection
r5015
def pytest_collection_modifyitems(session, config, items):
# nottest marked, compare nose, used for transition from nose to pytest
remaining = [
i for i in items if getattr(i.obj, '__test__', True)]
items[:] = remaining
tests: fixed all tests for python3 BIG changes
r5087 # NOTE(marcink): custom test ordering, db tests and vcstests are slowest and should
tests: move conftests to top level for better pytest test collection
r5015 # be executed at the end for faster test feedback
def sorter(item):
pos = 0
key = item._nodeid
if key.startswith('rhodecode/tests/database'):
pos = 1
elif key.startswith('rhodecode/tests/vcs_operations'):
pos = 2
return pos
items.sort(key=sorter)