Skip to content

Commit

Permalink
Add missing super().tearDown() for test classes with custom base cl…
Browse files Browse the repository at this point in the history
…asses (#2761)

Addresses #2752
  • Loading branch information
jonemo authored Sep 12, 2022
1 parent b5527ba commit 1fafb9a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/functional/test_mturk.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setUp(self):
self.stubber.activate()

def tearDown(self):
super().setUp()
super().tearDown()
self.stubber.deactivate()

def test_list_hits_aliased(self):
Expand Down
1 change: 1 addition & 0 deletions tests/functional/test_sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def _hook(self, **kwargs):
self.hook_calls.append(kwargs['event_name'])

def tearDown(self):
super().tearDown()
self.stubber.deactivate()

def test_event_with_old_prefix(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/auth/test_signers.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ def setUp(self):

def tearDown(self):
self.time_patch.stop()
super().tearDown()

def test_presign_with_query_string(self):
self.request.url = (
Expand Down Expand Up @@ -808,6 +809,7 @@ def setUp(self):

def tearDown(self):
self.datetime_patcher.stop()
super().tearDown()

def test_presign_no_params(self):
request = AWSRequest()
Expand Down Expand Up @@ -1044,6 +1046,7 @@ def setUp(self):

def tearDown(self):
self.time_patch.stop()
super().tearDown()

def test_presign_post(self):
self.auth.add_auth(self.request)
Expand Down Expand Up @@ -1110,6 +1113,7 @@ def setUp(self):

def tearDown(self):
self.datetime_patcher.stop()
super().tearDown()

def test_presign_post(self):
self.auth.add_auth(self.request)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_configloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
multi_file_load_config,
raw_config_parse,
)
from tests import BaseEnvVar, mock, unittest
from tests import mock, unittest


def path(filename):
Expand All @@ -33,7 +33,7 @@ def path(filename):
return os.path.join(directory, filename)


class TestConfigLoader(BaseEnvVar):
class TestConfigLoader(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.mkdtemp()

Expand Down

0 comments on commit 1fafb9a

Please sign in to comment.