mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use pytest conftest.py and drop pytest.ini
Let's replace some ugly hacks with proper pytest conftest.py hooks. Test initialization of ipalib.api is now handled in pytest_cmdline_main(). Pytest plugins, markers and ignores are also moved into conftest.py. Additional guards make it possible to run tests without ipaserver installed. I added confcutdir to ensure that pytest does not leave our project space. Pytest used pytest.ini or setup.py before but pytest.ini is gone. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Milan Kubik <mkubik@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
3387734e6c
commit
1e06a5195b
@@ -949,10 +949,3 @@ def create_api(mode='dummy'):
|
||||
return api
|
||||
|
||||
api = create_api(mode=None)
|
||||
|
||||
if os.environ.get('IPA_UNIT_TEST_MODE', None) == 'cli_test':
|
||||
from ipalib.cli import cli_plugins
|
||||
api.bootstrap(context='cli', in_server=False, in_tree=True, fallback=False)
|
||||
for klass in cli_plugins:
|
||||
api.add_plugin(klass)
|
||||
api.finalize()
|
||||
|
||||
Reference in New Issue
Block a user