on master help sign in
Fix ./manage.sh robot_tests (#1633)
3faaf34Alexandre Flament
manage.sh+1−1
@@ -35,7 +35,7 @@ install_geckodriver() {
35 if [ -z "$NOTFOUND" ]; then
35 if [ -z "$NOTFOUND" ]; then
36 return
36 return
37 fi
37 fi
38− GECKODRIVER_VERSION="v0.19.1"
38+ GECKODRIVER_VERSION="v0.24.0"
39 PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
39 PLATFORM="`python -c "import six; import platform; six.print_(platform.system().lower(), platform.architecture()[0])"`"
40 case "$PLATFORM" in
40 case "$PLATFORM" in
41 "linux 32bit" | "linux2 32bit") ARCH="linux32";;
41 "linux 32bit" | "linux2 32bit") ARCH="linux32";;
requirements-dev.txt+2−2
@@ -4,8 +4,8 @@ nose2[coverage_plugin]
4cov-core==1.15.0
4cov-core==1.15.0
5pep8==1.7.0
5pep8==1.7.0
6plone.testing==5.0.0
6plone.testing==5.0.0
7−splinter==0.7.5
7+splinter==0.11.0
8transifex-client==0.12.2
8transifex-client==0.12.2
9unittest2==1.1.0
9unittest2==1.1.0
10zope.testrunner==4.5.1
10zope.testrunner==4.5.1
11−selenium==3.5.0
11+selenium==3.141.0
searx/settings_robot.yml+8
@@ -39,3 +39,11 @@ engines:
39locales:
39locales:
40 en : English
40 en : English
41 hu : Magyar
41 hu : Magyar
42+
43+doi_resolvers :
44+ oadoi.org : 'https://oadoi.org/'
45+ doi.org : 'https://doi.org/'
46+ doai.io : 'http://doai.io/'
47+ sci-hub.tw : 'http://sci-hub.tw/'
48+
49+default_doi_resolver : 'oadoi.org'
searx/testing.py+3−1
@@ -6,7 +6,6 @@ import os
6import subprocess
6import subprocess
7import traceback
7import traceback
8
8
9−
10from os.path import dirname, join, abspath
9from os.path import dirname, join, abspath
11
10
12from splinter import Browser
11from splinter import Browser
@@ -49,6 +48,7 @@ class SearxRobotLayer():
49 exe = 'python'
48 exe = 'python'
50
49
51 # set robot settings path
50 # set robot settings path
51+ os.environ['SEARX_DEBUG'] = '1'
52 os.environ['SEARX_SETTINGS_PATH'] = abspath(
52 os.environ['SEARX_SETTINGS_PATH'] = abspath(
53 dirname(__file__) + '/settings_robot.yml')
53 dirname(__file__) + '/settings_robot.yml')
54
54
@@ -58,6 +58,8 @@ class SearxRobotLayer():
58 stdout=subprocess.PIPE,
58 stdout=subprocess.PIPE,
59 stderr=subprocess.STDOUT
59 stderr=subprocess.STDOUT
60 )
60 )
61+ if hasattr(self.server.stdout, 'read1'):
62+ print(self.server.stdout.read1(1024).decode('utf-8'))
61
63
62 def tearDown(self):
64 def tearDown(self):
63 os.kill(self.server.pid, 9)
65 os.kill(self.server.pid, 9)