summaryrefslogtreecommitdiff
path: root/fixtures/tests
diff options
context:
space:
mode:
authorhugovk <hugovk@users.noreply.github.com>2017-10-13 08:46:41 +0300
committerHugo <hugovk@users.noreply.github.com>2018-06-04 17:35:14 +0300
commitc2413ce54d2e2591aceac34866cde59199b7d2b8 (patch)
tree14cc7f2df7fb89100c955e88c411767a267386fc /fixtures/tests
parentaa6f5e0d92bddc65773c99f4ed5bb4b17248bdda (diff)
downloadfixtures-git-c2413ce54d2e2591aceac34866cde59199b7d2b8.tar.gz
Remove unused imports and variables
Diffstat (limited to 'fixtures/tests')
-rw-r--r--fixtures/tests/__init__.py2
-rw-r--r--fixtures/tests/_fixtures/test_mockpatch.py1
-rw-r--r--fixtures/tests/_fixtures/test_popen.py8
-rw-r--r--fixtures/tests/test_fixture.py6
4 files changed, 7 insertions, 10 deletions
diff --git a/fixtures/tests/__init__.py b/fixtures/tests/__init__.py
index 7766b76..1458043 100644
--- a/fixtures/tests/__init__.py
+++ b/fixtures/tests/__init__.py
@@ -16,8 +16,6 @@
import doctest
import unittest
-import fixtures.tests._fixtures
-
def test_suite():
standard_tests = unittest.TestSuite()
diff --git a/fixtures/tests/_fixtures/test_mockpatch.py b/fixtures/tests/_fixtures/test_mockpatch.py
index 97d1eb7..ee7706a 100644
--- a/fixtures/tests/_fixtures/test_mockpatch.py
+++ b/fixtures/tests/_fixtures/test_mockpatch.py
@@ -13,7 +13,6 @@
# under the License.
-import extras
import mock # Yes, we only test the rolling backport
import testtools
diff --git a/fixtures/tests/_fixtures/test_popen.py b/fixtures/tests/_fixtures/test_popen.py
index 6b629e1..ed9c2c7 100644
--- a/fixtures/tests/_fixtures/test_popen.py
+++ b/fixtures/tests/_fixtures/test_popen.py
@@ -1,12 +1,12 @@
# fixtures: Fixtures with cleanups for testing and convenience.
#
# Copyright (c) 2010, 2011, Robert Collins <robertc@robertcollins.net>
-#
+#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -62,7 +62,7 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
self.assertEqual(all_args, proc_args)
return {}
fixture = self.useFixture(FakePopen(get_info))
- proc = fixture(**all_args)
+ fixture(**all_args)
def test_custom_returncode(self):
def get_info(proc_args):
@@ -73,7 +73,7 @@ class TestFakePopen(testtools.TestCase, TestWithFixtures):
self.assertEqual(1, proc.returncode)
def test_with_popen_custom(self):
- fixture = self.useFixture(FakePopen())
+ self.useFixture(FakePopen())
with subprocess.Popen(['ls -lh']) as proc:
self.assertEqual(None, proc.returncode)
self.assertEqual(['ls -lh'], proc.args)
diff --git a/fixtures/tests/test_fixture.py b/fixtures/tests/test_fixture.py
index 6767921..66ac848 100644
--- a/fixtures/tests/test_fixture.py
+++ b/fixtures/tests/test_fixture.py
@@ -1,12 +1,12 @@
# fixtures: Fixtures with cleanups for testing and convenience.
#
# Copyright (c) 2010, Robert Collins <robertc@robertcollins.net>
-#
+#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -268,7 +268,7 @@ class TestFixture(testtools.TestCase):
self.addCleanup(log.append, 'cleaned')
raise MyBase('fred')
f = Subclass()
- e = self.assertRaises(MyBase, f.setUp)
+ self.assertRaises(MyBase, f.setUp)
self.assertRaises(TypeError, f.cleanUp)
self.assertEqual(['cleaned'], log)