Skip to content

Commit

Permalink
Removing calls of unittest.TestCase.setUp and unittest.TestCase.tearD…
Browse files Browse the repository at this point in the history
…own within setUp and tearDown of test classes.
  • Loading branch information
aelgru committed Jan 23, 2014
1 parent f3390cb commit bc3401d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions src/unittest/python/pluginloader_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@
class ThirdPartyPluginLoaderTest (unittest.TestCase):

def setUp(self):
super(ThirdPartyPluginLoaderTest, self).setUp()
self.project = mock()
self.loader = ThirdPartyPluginLoader(mock())

def tearDown(self):
super(ThirdPartyPluginLoaderTest, self).tearDown()
unstub()

def test_should_raise_exception_when_requiring_plugin_and_plugin_is_not_found(self):
Expand Down Expand Up @@ -71,12 +69,10 @@ def test_should_import_plugin_when_requiring_plugin_and_plugin_is_found_as_third
class BuiltinPluginLoaderTest (unittest.TestCase):

def setUp(self):
super(BuiltinPluginLoaderTest, self).setUp()
self.project = mock()
self.loader = BuiltinPluginLoader(mock())

def tearDown(self):
super(BuiltinPluginLoaderTest, self).tearDown()
unstub()

def test_should_raise_exception_when_requiring_plugin_and_plugin_is_not_found(self):
Expand Down
2 changes: 0 additions & 2 deletions src/unittest/python/plugins/python/distutils_plugin_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def test_should_return_value_string_when_value_and_default_given(self):
class BuildDataFilesStringTest(unittest.TestCase):

def setUp(self):
unittest.TestCase.setUp(self)
self.project = Project(".")

def test_should_return_empty_data_files_string(self):
Expand Down Expand Up @@ -136,7 +135,6 @@ def test_should_return_data_files_string_with_files_to_be_installed_in_several_d
class BuildPackageDataStringTest(unittest.TestCase):

def setUp(self):
unittest.TestCase.setUp(self)
self.project = Project('.')

def test_should_return_empty_package_data_string_when_no_files_to_include_given(self):
Expand Down
2 changes: 0 additions & 2 deletions src/unittest/python/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,11 @@ def callback(absolute_file_name, relative_file_name, additional_argument):
class MkdirTest(unittest.TestCase):

def setUp(self):
unittest.TestCase.setUp(self)
self.basedir = tempfile.mkdtemp(self.__class__.__name__)
self.any_directory = os.path.join(self.basedir, "any_dir")

def tearDown(self):
shutil.rmtree(self.basedir)
unittest.TestCase.tearDown(self)

def test_should_make_directory_if_it_does_not_exist(self):
mkdir(self.any_directory)
Expand Down

0 comments on commit bc3401d

Please sign in to comment.