summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fixtures/__init__.py1
-rw-r--r--lib/fixtures/_fixtures/__init__.py1
-rw-r--r--lib/fixtures/_fixtures/monkeypatch.py2
-rw-r--r--lib/fixtures/fixture.py2
-rw-r--r--lib/fixtures/tests/__init__.py1
-rw-r--r--lib/fixtures/tests/_fixtures/test_monkeypatch.py5
-rw-r--r--lib/fixtures/tests/_fixtures/test_packagepath.py2
-rw-r--r--lib/fixtures/tests/_fixtures/test_pythonpackage.py5
-rw-r--r--lib/fixtures/tests/_fixtures/test_pythonpath.py1
-rw-r--r--lib/fixtures/tests/_fixtures/test_timeout.py1
-rw-r--r--lib/fixtures/tests/test_fixture.py3
11 files changed, 7 insertions, 17 deletions
diff --git a/lib/fixtures/__init__.py b/lib/fixtures/__init__.py
index 9ec49f9..c0b0d48 100644
--- a/lib/fixtures/__init__.py
+++ b/lib/fixtures/__init__.py
@@ -54,6 +54,7 @@ __all__ = [
'PythonPackage',
'PythonPathEntry',
'TempDir',
+ 'TempHomeDir',
'TestWithFixtures',
'Timeout',
'TimeoutException',
diff --git a/lib/fixtures/_fixtures/__init__.py b/lib/fixtures/_fixtures/__init__.py
index 05db7cd..ec88780 100644
--- a/lib/fixtures/_fixtures/__init__.py
+++ b/lib/fixtures/_fixtures/__init__.py
@@ -29,6 +29,7 @@ __all__ = [
'PythonPackage',
'PythonPathEntry',
'TempDir',
+ 'TempHomeDir',
'Timeout',
'TimeoutException',
]
diff --git a/lib/fixtures/_fixtures/monkeypatch.py b/lib/fixtures/_fixtures/monkeypatch.py
index 8be7831..42de7ec 100644
--- a/lib/fixtures/_fixtures/monkeypatch.py
+++ b/lib/fixtures/_fixtures/monkeypatch.py
@@ -17,8 +17,6 @@ __all__ = [
'MonkeyPatch'
]
-import os
-
from fixtures import Fixture
diff --git a/lib/fixtures/fixture.py b/lib/fixtures/fixture.py
index 8f1c796..3573683 100644
--- a/lib/fixtures/fixture.py
+++ b/lib/fixtures/fixture.py
@@ -143,7 +143,7 @@ class Fixture(object):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
- errors = self.cleanUp()
+ self.cleanUp()
return False # propogate exceptions from the with body.
def getDetails(self):
diff --git a/lib/fixtures/tests/__init__.py b/lib/fixtures/tests/__init__.py
index 9059073..1274e07 100644
--- a/lib/fixtures/tests/__init__.py
+++ b/lib/fixtures/tests/__init__.py
@@ -21,7 +21,6 @@ import fixtures.tests._fixtures
def test_suite():
- result = unittest.TestSuite()
standard_tests = unittest.TestSuite()
loader = unittest.TestLoader()
return load_tests(loader, standard_tests, None)
diff --git a/lib/fixtures/tests/_fixtures/test_monkeypatch.py b/lib/fixtures/tests/_fixtures/test_monkeypatch.py
index 5f96e1c..b5977d3 100644
--- a/lib/fixtures/tests/_fixtures/test_monkeypatch.py
+++ b/lib/fixtures/tests/_fixtures/test_monkeypatch.py
@@ -15,11 +15,10 @@
import testtools
-import fixtures
from fixtures import MonkeyPatch, TestWithFixtures
reference = 23
-
+
class TestMonkeyPatch(testtools.TestCase, TestWithFixtures):
def test_patch_and_restore(self):
@@ -36,7 +35,6 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures):
def test_patch_missing_attribute(self):
fixture = MonkeyPatch(
'fixtures.tests._fixtures.test_monkeypatch.new_attr', True)
- sentinel = object()
self.assertFalse('new_attr' in globals())
fixture.setUp()
try:
@@ -61,7 +59,6 @@ class TestMonkeyPatch(testtools.TestCase, TestWithFixtures):
fixture = MonkeyPatch(
'fixtures.tests._fixtures.test_monkeypatch.new_attr',
MonkeyPatch.delete)
- sentinel = object()
self.assertFalse('new_attr' in globals())
fixture.setUp()
try:
diff --git a/lib/fixtures/tests/_fixtures/test_packagepath.py b/lib/fixtures/tests/_fixtures/test_packagepath.py
index fd52194..6833fdc 100644
--- a/lib/fixtures/tests/_fixtures/test_packagepath.py
+++ b/lib/fixtures/tests/_fixtures/test_packagepath.py
@@ -13,8 +13,6 @@
# license you chose for the specific language governing permissions and
# limitations under that license.
-import sys
-
import testtools
import fixtures
diff --git a/lib/fixtures/tests/_fixtures/test_pythonpackage.py b/lib/fixtures/tests/_fixtures/test_pythonpackage.py
index b235b3d..4e2160b 100644
--- a/lib/fixtures/tests/_fixtures/test_pythonpackage.py
+++ b/lib/fixtures/tests/_fixtures/test_pythonpackage.py
@@ -18,10 +18,9 @@ import os.path
import testtools
from testtools.compat import _b
-import fixtures
-from fixtures import PythonPackage, TempDir, TestWithFixtures
+from fixtures import PythonPackage, TestWithFixtures
+
-
class TestPythonPackage(testtools.TestCase, TestWithFixtures):
def test_has_tempdir(self):
diff --git a/lib/fixtures/tests/_fixtures/test_pythonpath.py b/lib/fixtures/tests/_fixtures/test_pythonpath.py
index b0e0281..5bb6851 100644
--- a/lib/fixtures/tests/_fixtures/test_pythonpath.py
+++ b/lib/fixtures/tests/_fixtures/test_pythonpath.py
@@ -17,7 +17,6 @@ import sys
import testtools
-import fixtures
from fixtures import (
PythonPathEntry,
TempDir,
diff --git a/lib/fixtures/tests/_fixtures/test_timeout.py b/lib/fixtures/tests/_fixtures/test_timeout.py
index cbd868e..266e257 100644
--- a/lib/fixtures/tests/_fixtures/test_timeout.py
+++ b/lib/fixtures/tests/_fixtures/test_timeout.py
@@ -13,7 +13,6 @@
# license you chose for the specific language governing permissions and
# limitations under that license.
-import os
import signal
import time
diff --git a/lib/fixtures/tests/test_fixture.py b/lib/fixtures/tests/test_fixture.py
index 8443426..d1343e3 100644
--- a/lib/fixtures/tests/test_fixture.py
+++ b/lib/fixtures/tests/test_fixture.py
@@ -13,7 +13,6 @@
# license you chose for the specific language governing permissions and
# limitations under that license.
-import sys
import types
import testtools
@@ -102,7 +101,7 @@ class TestFixture(testtools.TestCase):
self.addCleanup(raise_exception2)
self.addCleanup(raise_exception1)
fixture = FixtureWithException()
- ctx = fixture.__enter__()
+ fixture.__enter__()
exc = self.assertRaises(Exception, fixture.__exit__, None, None, None)
self.assertEqual(('woo',), exc.args[0][1].args)
self.assertEqual(('hoo',), exc.args[1][1].args)