forked from gitter-badger/hackedit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconftest.py
38 lines (28 loc) · 1018 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import shutil
import os
import sys
from PyQt5 import QtWidgets
os.environ['PYTEST_QT_API'] = 'pyqt5'
os.environ['QT_API'] = 'pyqt5'
os.environ['HACKEDIT_CORE_TEST_SUITE'] = '1'
os.environ['HACKEDIT_VENDOR_PATH'] = 'hackedit/vendor'
sys.path.insert(0, os.environ['HACKEDIT_VENDOR_PATH'])
from hackedit.main import setup_sqlite3 # noqa
setup_sqlite3()
app = QtWidgets.QApplication(sys.argv)
QtWidgets.qApp.setOrganizationName('HackEdit-TestSuite')
QtWidgets.qApp.setApplicationDisplayName('HackEdit-TestSuite')
QtWidgets.qApp.setApplicationName('HackEdit-TestSuite')
from hackedit.api.gettext import get_translation # noqa
get_translation()
for pth in ['tests/data/FooBarProj/.hackedit',
'tests/data/SpamEggsProj/.hackedit',
'tests/data/SpamEggsProj2/.hackedit',
'tests/data/SpamEggsProj3/.hackedit']:
try:
shutil.rmtree(os.path.join(os.getcwd(), pth))
except OSError:
pass
import logging
from hackedit.app import logger
logger.setup(logging.INFO)