Skip to content

Commit

Permalink
SectionExecutorTest: Close output objects
Browse files Browse the repository at this point in the history
  • Loading branch information
sils committed Apr 8, 2015
1 parent 32ba7ad commit c58d19b
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions coalib/tests/processes/SectionExecutorTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,48 @@ def begin_section(self, name):

class SectionExecutorInitTestCase(unittest.TestCase):
def test_init(self):
interactor = ConsoleInteractor()
log_printer = ConsolePrinter()
self.assertRaises(TypeError,
SectionExecutor,
5,
[],
[],
ConsoleInteractor(),
ConsolePrinter())
interactor,
log_printer)
self.assertRaises(TypeError,
SectionExecutor,
Section("test"),
5,
[],
ConsoleInteractor(),
ConsolePrinter())
interactor,
log_printer)
self.assertRaises(TypeError,
SectionExecutor,
Section("test"),
[],
5,
ConsoleInteractor(),
ConsolePrinter())
interactor,
log_printer)
self.assertRaises(TypeError,
SectionExecutor,
Section("test"),
[],
[],
5,
ConsolePrinter())
log_printer)
self.assertRaises(TypeError,
SectionExecutor,
Section("test"),
[],
[],
ConsoleInteractor(),
interactor,
5)
SectionExecutor(Section("test"),
[],
[],
ConsoleInteractor(),
ConsolePrinter()).run
interactor,
log_printer)

This comment has been minimized.

Copy link
@sils

sils Apr 9, 2015

Author Member

forgot to close interactor and logprinter here



class SectionExecutorTestCase(unittest.TestCase):
Expand Down Expand Up @@ -104,6 +106,9 @@ def setUp(self):
self.interactor,
self.interactor)

def tearDown(self):
self.interactor.close()

This comment has been minimized.

Copy link
@Makman2

Makman2 Apr 8, 2015

Member

what's with log_printer?

This comment has been minimized.

Copy link
@sils

sils Apr 8, 2015

Author Member

yeah... thats missing...

This comment has been minimized.

Copy link
@sils

sils Apr 9, 2015

Author Member

its not. this is another class.

def test_run(self):
self.assertTrue(self.uut.run())

Expand Down

0 comments on commit c58d19b

Please sign in to comment.