From 4c8ae508a31376cc0df41f5bb47a62b269361e29 Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Mon, 31 Oct 2016 14:10:54 +1100 Subject: [PATCH] Remove superfluous manipulation of import path. --- test/helper.py | 2 -- test/test_changesfile.py | 3 --- test/test_configfile.py | 3 --- test/test_crypto.py | 5 ----- test/test_dcut.py | 3 --- test/test_dput.py | 3 --- test/test_dput_main.py | 3 --- test/test_dputhelper.py | 3 --- test/test_methods.py | 4 ---- 9 files changed, 29 deletions(-) diff --git a/test/helper.py b/test/helper.py index 358b2f1..bb4ee92 100644 --- a/test/helper.py +++ b/test/helper.py @@ -53,8 +53,6 @@ import collections import weakref import shlex -__package__ = str("test") -__import__(__package__) __metaclass__ = type diff --git a/test/test_changesfile.py b/test/test_changesfile.py index ab31a58..ff2a788 100644 --- a/test/test_changesfile.py +++ b/test/test_changesfile.py @@ -23,9 +23,6 @@ import collections import testtools import testscenarios -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.dput from dput.helper import dputhelper diff --git a/test/test_configfile.py b/test/test_configfile.py index 0e1dd5b..cf7a450 100644 --- a/test/test_configfile.py +++ b/test/test_configfile.py @@ -21,9 +21,6 @@ import doctest import testtools import testtools.matchers -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.dput from .helper import ( diff --git a/test/test_crypto.py b/test/test_crypto.py index f9dc5b5..4f25301 100644 --- a/test/test_crypto.py +++ b/test/test_crypto.py @@ -14,8 +14,6 @@ from __future__ import (absolute_import, unicode_literals) import doctest import functools import operator -import os -import os.path import sys import textwrap @@ -23,9 +21,6 @@ import gpgme import testscenarios import testtools -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.crypto from .helper import ( diff --git a/test/test_dcut.py b/test/test_dcut.py index 77b3409..284a7e3 100644 --- a/test/test_dcut.py +++ b/test/test_dcut.py @@ -24,9 +24,6 @@ import testtools import testscenarios import pkg_resources -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.dcut from dput.helper import dputhelper diff --git a/test/test_dput.py b/test/test_dput.py index 3cff30f..8301f24 100644 --- a/test/test_dput.py +++ b/test/test_dput.py @@ -27,9 +27,6 @@ import testtools import testtools.matchers import testscenarios -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.crypto import dput.dput from dput.helper import dputhelper diff --git a/test/test_dput_main.py b/test/test_dput_main.py index 9bfc34e..617140d 100644 --- a/test/test_dput_main.py +++ b/test/test_dput_main.py @@ -22,9 +22,6 @@ import testtools.matchers import testscenarios import pkg_resources -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.dput from dput.helper import dputhelper diff --git a/test/test_dputhelper.py b/test/test_dputhelper.py index cfa4d30..0397c18 100644 --- a/test/test_dputhelper.py +++ b/test/test_dputhelper.py @@ -26,9 +26,6 @@ import testtools.matchers import testscenarios import pkg_resources -__package__ = str("test") -__import__(__package__) -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) from dput.helper import dputhelper from .helper import ( diff --git a/test/test_methods.py b/test/test_methods.py index 9118e72..24bacf6 100644 --- a/test/test_methods.py +++ b/test/test_methods.py @@ -37,10 +37,6 @@ import testtools import testscenarios import httpretty -__package__ = str("test") -__import__(__package__) - -sys.path.insert(1, os.path.dirname(os.path.dirname(__file__))) import dput.dput import dput.helper.dputhelper import dput.methods -- 2.11.4.GIT