mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pytest: Migrate unittest/nose to Pytest fixtures
Even though Pytest supports xunit style setups, unittest and nose tests, this support is limited and may be dropped in the future releases. Worst of all is that the mixing of various test frameworks results in weird conflicts and of course, is not widely tested. This is a part of work to remove the mixing of test idioms in the IPA's test suite: 1) replace unittest.TestCase subclasses 2) replace unittest test controls (SkipTest, fail, etc.) 3) replace unittest assertions Related: https://pagure.io/freeipa/issue/7989 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Alexander Bokovoy
parent
292d686c0b
commit
fec66942d4
@@ -25,7 +25,6 @@ from __future__ import absolute_import
|
||||
|
||||
import distutils.spawn
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -69,6 +68,6 @@ class cmdline_test(XMLRPC_test):
|
||||
'Command %r not available' % original_command
|
||||
)
|
||||
if not server_available:
|
||||
raise unittest.SkipTest(
|
||||
pytest.skip(
|
||||
'Server not available: %r' % api.env.xmlrpc_uri
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user