Skip to content

Commit fbed636

Browse files
committed
utest and setup.py fixes after adding new output.console package
1 parent 0679505 commit fbed636

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
new keywords from existing ones using the same syntax that is used for
3535
creating test cases.
3636
""".strip()
37-
PACKAGES = ['robot', 'robot.api', 'robot.conf',
38-
'robot.htmldata', 'robot.libdocpkg', 'robot.libraries',
39-
'robot.model', 'robot.output', 'robot.parsing',
37+
PACKAGES = ['robot', 'robot.api', 'robot.conf', 'robot.htmldata',
38+
'robot.libdocpkg', 'robot.libraries', 'robot.model',
39+
'robot.output', 'robot.output.console', 'robot.parsing',
4040
'robot.reporting', 'robot.result', 'robot.running',
4141
'robot.running.arguments', 'robot.running.timeouts',
4242
'robot.utils', 'robot.variables', 'robot.writer']
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33

44
from robot.utils.asserts import assert_equals
5-
from robot.output.monitor import CommandLineMonitor
5+
from robot.output.console.verbose import VerboseOutput
66

77
# Overwrite IronPython's special utils.isatty with version using stream.isatty.
88
# Otherwise our StreamStub.isatty would not really work.
@@ -15,9 +15,9 @@ class TestKeywordNotification(unittest.TestCase):
1515

1616
def setUp(self, markers='AUTO', isatty=True):
1717
self.stream = StreamStub(isatty)
18-
self.monitor = CommandLineMonitor(width=16, colors='off', markers=markers,
19-
stdout=self.stream, stderr=self.stream)
20-
self.monitor.start_test(Stub())
18+
self.console = VerboseOutput(width=16, colors='off', markers=markers,
19+
stdout=self.stream, stderr=self.stream)
20+
self.console.start_test(Stub())
2121

2222
def test_write_pass_marker(self):
2323
self._write_marker()
@@ -46,12 +46,12 @@ def test_more_markers_than_fit_into_status_area(self):
4646

4747
def test_clear_markers_when_test_status_is_written(self):
4848
self._write_marker(count=5)
49-
self.monitor.end_test(Stub())
50-
self._verify('| PASS |\n%s\n' % ('-'*self.monitor._writer._width))
49+
self.console.end_test(Stub())
50+
self._verify('| PASS |\n%s\n' % ('-'*self.console._writer._width))
5151

5252
def test_clear_markers_when_there_are_warnings(self):
5353
self._write_marker(count=5)
54-
self.monitor.message(MessageStub())
54+
self.console.message(MessageStub())
5555
self._verify(before='[ WARN ] Message\n')
5656
self._write_marker(count=2)
5757
self._verify(before='[ WARN ] Message\n', after='..')
@@ -76,8 +76,8 @@ def test_markers_auto_off(self):
7676

7777
def _write_marker(self, status='PASS', count=1):
7878
for i in range(count):
79-
self.monitor.start_keyword(Stub())
80-
self.monitor.end_keyword(Stub(status=status))
79+
self.console.start_keyword(Stub())
80+
self.console.end_keyword(Stub(status=status))
8181

8282
def _verify(self, after='', before=''):
8383
assert_equals(str(self.stream), '%sX :: D %s' % (before, after))

utest/output/test_logger.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from robot.utils.asserts import assert_equals, assert_true, assert_false
44

5-
from robot.output.logger import Logger, CommandLineMonitor
5+
from robot.output.logger import Logger
6+
from robot.output.console.verbose import VerboseOutput
67

78

89
class MessageMock:
@@ -125,9 +126,9 @@ def end_keyword(self, keyword): self.ended_keyword = keyword
125126
getattr(self.logger, stend + '_' + name)(name)
126127
assert_equals(getattr(logger, stend + 'ed_' + name), name)
127128

128-
def test_console_logger_is_automatically_registered(self):
129+
def test_verbosoe_console_output_is_automatically_registered(self):
129130
logger = Logger()
130-
assert_true(logger._loggers.all_loggers()[0].start_suite.im_class is CommandLineMonitor)
131+
assert_true(logger._loggers.all_loggers()[0].start_suite.im_class is VerboseOutput)
131132

132133
def test_loggercollection_is_iterable(self):
133134
logger = Logger()

0 commit comments

Comments
 (0)