Converted test_conftest to pytest
This commit is contained in:
parent
99abd1edeb
commit
6429d29a23
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,7 @@ def app_and_logging(qapp):
|
||||
and used by all tests.
|
||||
"""
|
||||
from log import init
|
||||
|
||||
init()
|
||||
|
||||
|
||||
@ -38,4 +39,14 @@ def stubs():
|
||||
Provides access to stub objects useful for testing.
|
||||
"""
|
||||
import stubs
|
||||
|
||||
return stubs
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def unicode_encode_err():
|
||||
return UnicodeEncodeError('ascii', # codec
|
||||
'', # object
|
||||
0, # start
|
||||
2, # end
|
||||
'fake exception') # reason
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
"""Helpers needed by tests."""
|
||||
|
||||
import os
|
||||
import logging
|
||||
import contextlib
|
||||
from unittest import mock
|
||||
@ -29,13 +28,6 @@ from PyQt5.QtWebKitWidgets import QWebPage
|
||||
from PyQt5.QtNetwork import QNetworkAccessManager
|
||||
|
||||
|
||||
unicode_encode_err = UnicodeEncodeError('ascii', # codec
|
||||
'', # object
|
||||
0, # start
|
||||
2, # end
|
||||
'fake exception') # reason
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def disable_logger(name):
|
||||
"""Temporarily disable a logger."""
|
||||
|
Loading…
Reference in New Issue
Block a user