equal
deleted
inserted
replaced
22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 import os |
25 import os |
26 import sys |
26 import sys |
27 import time |
|
28 |
27 |
29 import pytest |
28 # import pytest |
30 import xvfbwrapper |
29 # import xvfbwrapper |
31 |
30 |
32 # append module root directory to sys.path |
|
33 sys.path.append( |
|
34 os.path.abspath( |
|
35 os.path.join( |
|
36 os.path.dirname(__file__), '..', '..') |
|
37 ) |
|
38 ) |
|
39 |
31 |
|
32 def init_environment(): |
|
33 """Append module root directory to sys.path""" |
|
34 try: |
|
35 import Beremiz as _Beremiz |
|
36 except ImportError: |
|
37 sys.path.append( |
|
38 os.path.abspath( |
|
39 os.path.join( |
|
40 os.path.dirname(__file__), '..', '..') |
|
41 ) |
|
42 ) |
|
43 |
|
44 |
|
45 init_environment() |
40 |
46 |
41 # |
47 # |
42 # Something seems to be broken in Beremiz application, |
48 # Something seems to be broken in Beremiz application, |
43 # because after tests in test_application.py during Xvfb shutdown |
49 # because after tests in test_application.py during Xvfb shutdown |
44 # pytest returns error message: |
50 # pytest returns error message: |