tests: remove custom --without-postgresql-tests test option (#39641)
pytest.config was deprecated in pytest 5 and it's not worth adapting all tests.
This commit is contained in:
parent
583d80ad06
commit
9ccf61e6c9
|
@ -6,16 +6,6 @@ import pytest
|
|||
from utilities import EmailsMocking, SMSMocking, HttpRequestsMocking
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption('--without-postgresql-tests', action='store_true',
|
||||
help='disable tests requiring postgresql')
|
||||
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
if 'postgresql' in item.keywords and item.config.option.without_postgresql_tests is True:
|
||||
pytest.skip('skipped (PostgreSQL are disabled on command line)')
|
||||
|
||||
|
||||
def site_options(request, pub, section, variable, value):
|
||||
config = ConfigParser.ConfigParser()
|
||||
path = os.path.join(pub.app_dir, 'site-options.cfg')
|
||||
|
|
|
@ -44,10 +44,6 @@ known_elements = KnownElements()
|
|||
|
||||
|
||||
def create_temporary_pub(sql_mode=False, templates_mode=False, lazy_mode=False):
|
||||
if sql_mode is True:
|
||||
if pytest.config.getoption('without_postgresql_tests'):
|
||||
pytest.skip("unsupported configuration")
|
||||
return
|
||||
if get_publisher():
|
||||
get_publisher().cleanup()
|
||||
cleanup()
|
||||
|
|
Loading…
Reference in New Issue