Skip to content

Commit

Permalink
Merge pull request #16 from kyleknap/fix-tests-again
Browse files Browse the repository at this point in the history
Fix some windows unit tests
  • Loading branch information
kyleknap authored Jun 15, 2016
2 parents a16ce0e + 5d8e522 commit 75fed7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,14 @@ def setUp(self):
super(TestUploadSeekableInputManager, self).setUp()
self.upload_input_manager = UploadSeekableInputManager(self.osutil)
self.fileobj = open(self.filename, 'rb')
self.addCleanup(self.fileobj.close)
self.call_args = CallArgs(
fileobj=self.fileobj, subscribers=self.subscribers)
self.future = self.get_transfer_future(self.call_args)

def tearDown(self):
self.fileobj.close()
super(TestUploadSeekableInputManager, self).tearDown()


class TestUploadSubmissionTask(BaseSubmissionTaskTest):
def setUp(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ def setUp(self):
self.open_called_count = 0
self.deferred_open_file.OPEN_METHOD = self.counting_open_method

def tearDown(self):
self.deferred_open_file.close()
super(TestDefferedOpenFile, self).tearDown()

def counting_open_method(self, filename, mode):
self.open_called_count += 1
return open(filename, mode)
Expand Down

0 comments on commit 75fed7e

Please sign in to comment.