From bc183b8e6107f18afce9a8d7ae58e82f7cb60e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20H=C3=B6nig?= Date: Sat, 17 Jun 2017 13:59:28 +0200 Subject: [PATCH] bots: tests: Remove superfluous sys.path insertion. --- api/bots/converter/test_converter.py | 8 -------- api/bots/define/test_define.py | 8 -------- api/bots/encrypt/test_encrypt.py | 8 -------- api/bots/followup/test_followup.py | 8 -------- api/bots/giphy/test_giphy.py | 7 ------- api/bots/helloworld/test_helloworld.py | 7 ------- api/bots/help/test_help.py | 7 ------- api/bots/thesaurus/test_thesaurus.py | 8 -------- api/bots/virtual_fs/test_virtual_fs.py | 8 -------- api/bots/wikipedia/test_wikipedia.py | 8 -------- api/bots/xkcd/test_xkcd.py | 8 -------- 11 files changed, 85 deletions(-) diff --git a/api/bots/converter/test_converter.py b/api/bots/converter/test_converter.py index b379b0851e..856fbf0448 100644 --- a/api/bots/converter/test_converter.py +++ b/api/bots/converter/test_converter.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestConverterBot(BotTestCase): diff --git a/api/bots/define/test_define.py b/api/bots/define/test_define.py index 1841fa948a..636d94386f 100644 --- a/api/bots/define/test_define.py +++ b/api/bots/define/test_define.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestDefineBot(BotTestCase): diff --git a/api/bots/encrypt/test_encrypt.py b/api/bots/encrypt/test_encrypt.py index 030f1753b7..363ca3ef51 100644 --- a/api/bots/encrypt/test_encrypt.py +++ b/api/bots/encrypt/test_encrypt.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestEncryptBot(BotTestCase): diff --git a/api/bots/followup/test_followup.py b/api/bots/followup/test_followup.py index 10df98c2d6..c929b3c4d0 100644 --- a/api/bots/followup/test_followup.py +++ b/api/bots/followup/test_followup.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestFollowUpBot(BotTestCase): diff --git a/api/bots/giphy/test_giphy.py b/api/bots/giphy/test_giphy.py index 98d277b168..06349b8b24 100644 --- a/api/bots/giphy/test_giphy.py +++ b/api/bots/giphy/test_giphy.py @@ -3,15 +3,8 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys import json -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestGiphyBot(BotTestCase): diff --git a/api/bots/helloworld/test_helloworld.py b/api/bots/helloworld/test_helloworld.py index 256b8b83d1..4b3682253d 100644 --- a/api/bots/helloworld/test_helloworld.py +++ b/api/bots/helloworld/test_helloworld.py @@ -3,15 +3,8 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys from six.moves import zip -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestHelloWorldBot(BotTestCase): diff --git a/api/bots/help/test_help.py b/api/bots/help/test_help.py index c115722b6e..9048531ede 100644 --- a/api/bots/help/test_help.py +++ b/api/bots/help/test_help.py @@ -3,15 +3,8 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys from six.moves import zip -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestHelpBot(BotTestCase): diff --git a/api/bots/thesaurus/test_thesaurus.py b/api/bots/thesaurus/test_thesaurus.py index 533b2f1589..8d04b71a59 100644 --- a/api/bots/thesaurus/test_thesaurus.py +++ b/api/bots/thesaurus/test_thesaurus.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestThesaurusBot(BotTestCase): diff --git a/api/bots/virtual_fs/test_virtual_fs.py b/api/bots/virtual_fs/test_virtual_fs.py index 644f340cf5..6cffe793c3 100644 --- a/api/bots/virtual_fs/test_virtual_fs.py +++ b/api/bots/virtual_fs/test_virtual_fs.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestVirtualFsBot(BotTestCase): diff --git a/api/bots/wikipedia/test_wikipedia.py b/api/bots/wikipedia/test_wikipedia.py index 5d9f50f911..2769f0f822 100644 --- a/api/bots/wikipedia/test_wikipedia.py +++ b/api/bots/wikipedia/test_wikipedia.py @@ -3,14 +3,6 @@ from __future__ import absolute_import from __future__ import print_function -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestWikipediaBot(BotTestCase): diff --git a/api/bots/xkcd/test_xkcd.py b/api/bots/xkcd/test_xkcd.py index 4d702b19ae..703df78d49 100644 --- a/api/bots/xkcd/test_xkcd.py +++ b/api/bots/xkcd/test_xkcd.py @@ -4,14 +4,6 @@ from __future__ import absolute_import from __future__ import print_function import mock -import os -import sys - -our_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) -# For dev setups, we can find the API in the repo itself. -if os.path.exists(os.path.join(our_dir, '..')): - sys.path.insert(0, '..') from bots_test_lib import BotTestCase class TestXkcdBot(BotTestCase):