Permalink
Browse files

fix bug on redo test not working

  • Loading branch information...
1 parent 888469b commit 20d96717a8c8274fc1c2be55e669d85a6b5c2688 @ostinelli committed Oct 13, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 sublimerl_tests_integration.py
View
9 sublimerl_tests_integration.py
@@ -265,6 +265,7 @@ def compile_eunit_run_suite(self, suite, function_name=None):
if function_name != None:
os_cmd += ' tests=%s' % function_name
if self.app_name: os_cmd += ' apps=%s' % self.app_name
+
retcode, data = self.execute_os_command(os_cmd, dir_type='project', block=False)
# interpret
self.interpret_test_results(retcode, data)
@@ -396,7 +397,7 @@ def dialyzer_test(self, view):
if test_runner.initialized == False: return
test_runner.start_test()
- def ct_or_eunit_test(self, view):
+ def ct_or_eunit_test(self, view, new=True):
if SUBLIMERL.get_erlang_module_name(view).find("_SUITE") != -1:
# ct
test_runner = SublimErlCtTestRunner(view)
@@ -405,7 +406,7 @@ def ct_or_eunit_test(self, view):
test_runner = SublimErlEunitTestRunner(view)
if test_runner.initialized == False: return
- test_runner.start_test()
+ test_runner.start_test(new=new)
# dialyzer tests
@@ -424,8 +425,8 @@ def run_command(self, edit):
class SublimErlRedoCommand(SublimErlTextCommand):
def run_command(self, edit):
# init
- if SUBLIMERL.last_test_type == 'dialyzer': SublimErlTestRunners().dialyzer_test(self.view)
- elif SUBLIMERL.last_test_type == 'eunit' or SUBLIMERL.last_test_type == 'ct': SublimErlTestRunners().ct_or_eunit_test(self.view)
+ if SUBLIMERL.last_test_type == 'dialyzer': SublimErlTestRunners().dialyzer_test(self.view, new=False)
+ elif SUBLIMERL.last_test_type == 'eunit' or SUBLIMERL.last_test_type == 'ct': SublimErlTestRunners().ct_or_eunit_test(self.view, new=False)
def show_contextual_menu(self):
return SUBLIMERL.last_test != None

0 comments on commit 20d9671

Please sign in to comment.