logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 472a40902274772bbec66d93191b12d02131f1b7
parent: 0fbd705259c500bb01ec2d649670de2f0a91830a
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Sat, 27 Feb 2016 18:41:09 +0100

[fix] robot tests

Diffstat:

searx/settings_robot.yml | 3+++
searx/testing.py | 14+++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/searx/settings_robot.yml b/searx/settings_robot.yml @@ -1,5 +1,6 @@ general: debug : False + instance_name : "searx_test" search: safe_search : 0 @@ -25,10 +26,12 @@ engines: - name : general_dummy engine : dummy categories : general + shortcut : gd - name : dummy_dummy engine : dummy categories : dummy + shortcut : dd locales: en : English diff --git a/searx/testing.py b/searx/testing.py @@ -57,7 +57,7 @@ class SearxRobotLayer(Layer): ) def tearDown(self): - os.kill(self.server.pid, 15) + os.kill(self.server.pid, 9) # remove previously set environment variable del os.environ['SEARX_SETTINGS_PATH'] @@ -78,7 +78,11 @@ if __name__ == '__main__': base_dir = abspath(join(dirname(__file__), '../tests')) if sys.argv[1] == 'robot': - Runner(['--color', - '--auto-progress', - '--path', base_dir], - found_suites=[test_suite()]).run() + r = Runner(['--color', + '--auto-progress', + '--stop-on-error', + '--path', + base_dir], + found_suites=[test_suite()]) + r.run() + sys.exit(int(r.failed))