Skip to content

Commit b7bb7e2

Browse files
committed
Merge branch '1500_deprecated_warnings' of https://github.com/timjohncurtis/RIDE into timjohncurtis-1500_deprecated_warnings
2 parents c689879 + 60dcfe2 commit b7bb7e2

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/robotide/contrib/testrunner/testrunner.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ def run_command(self, command, cwd):
171171
self._process = Process(cwd)
172172
self._process.run_command(command)
173173

174-
def get_command(self, profile, pythonpath, monitor_width, names_to_run):
174+
def get_command(self, profile, pythonpath, console_width, names_to_run):
175175
'''Return the command (as a list) used to run the test'''
176176
command = profile.get_command_prefix()[:]
177177
argfile = os.path.join(self._output_dir, "argfile.txt")
178178
command.extend(["--argumentfile", argfile])
179179
command.extend(["--listener", self._get_listener_to_cmd()])
180180
command.append(self._get_suite_source_for_command())
181181
self._write_argfile(argfile, self._create_standard_args(
182-
command, profile, pythonpath, monitor_width, names_to_run))
182+
command, profile, pythonpath, console_width, names_to_run))
183183
return command
184184

185185
@staticmethod
@@ -211,16 +211,16 @@ def _get_suite_source_for_command(self):
211211
return os.path.abspath(self._project.suite.source)
212212

213213
def _create_standard_args(
214-
self, command, profile, pythonpath, monitor_width, names_to_run):
214+
self, command, profile, pythonpath, console_width, names_to_run):
215215
standard_args = []
216216
standard_args.extend(profile.get_custom_args())
217217
self._add_tmp_outputdir_if_not_given_by_user(command, standard_args)
218218
self._add_pythonpath_if_in_settings_and_not_given_by_user(
219219
command, standard_args, pythonpath)
220220
# Have to use short options, because of long option was changed in
221221
# RF 2.8 -> 2.9, and we don't necessarily know the installed version.
222-
standard_args.extend(["-C", "off"])
223-
standard_args.extend(["-W", monitor_width])
222+
standard_args.extend(["-C", "off"]) # --consolecolor
223+
standard_args.extend(["-W", console_width]) # --consolewidth
224224
for suite, test in names_to_run:
225225
standard_args += ['--suite', suite, '--test', test]
226226
return standard_args

src/robotide/contrib/testrunner/testrunnerplugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def _create_command(self):
266266
command_as_list = self._test_runner.get_command(
267267
self.get_current_profile(),
268268
self.global_settings.get('pythonpath', None),
269-
self._get_monitor_width(),
269+
self._get_console_width(),
270270
self._names_to_run)
271271
self._min_log_level_number = self._test_runner.get_message_log_level(command_as_list)
272272
command = self._format_command(command_as_list)
@@ -446,7 +446,7 @@ def _AppendText(self, textctrl, string, source="stdout"):
446446
linecount = textctrl.GetLineCount()
447447
textctrl.ScrollToLine(linecount)
448448

449-
def _get_monitor_width(self):
449+
def _get_console_width(self):
450450
# robot wants to know a fixed size for output, so calculate the
451451
# width of the window based on average width of a character. A
452452
# little is subtracted just to make sure there's a little margin

src/robotide/contrib/testrunner/usages.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,16 @@
231231
--runmode mode * Deprecated in version 2.8. Use individual options
232232
--dryrun, --exitonfailure, --skipteardownonexit, or
233233
--randomize instead.
234-
-W --monitorwidth chars Width of the monitor output. Default is 78.
235-
-C --monitorcolors auto|on|ansi|off Use colors on console output or not.
234+
-W --consolewidth chars Width of the console output. Default is 78.
235+
-C --consolecolors auto|on|ansi|off Use colors on console output or not.
236236
auto: use colors when output not redirected (default)
237237
on: always use colors
238238
ansi: like `on` but use ANSI colors also on Windows
239239
off: disable colors altogether
240240
Note that colors do not work with Jython on Windows.
241-
-K --monitormarkers auto|on|off Show `.` (success) or `F` (failure) on
241+
-K --consolemarkers auto|on|off Show `.` (success) or `F` (failure) on
242242
console when top level keywords in test cases end.
243-
Values have same semantics as with --monitorcolors.
243+
Values have same semantics as with --consolecolors.
244244
-P --pythonpath path * Additional locations (directories, ZIPs, JARs) where
245245
to search test libraries from when they are imported.
246246
Multiple paths can be given by separating them with a
@@ -326,4 +326,4 @@
326326
# Setting syslog file before running tests.
327327
$ export ROBOT_SYSLOG_FILE=/tmp/syslog.txt
328328
$ pybot tests.tsv
329-
"""
329+
"""

utest/contrib/testrunner/test_command_creation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def test_command(self):
2929
['custom', 'args',
3030
'--outputdir', 'temppi',
3131
'--pythonpath', 'PYTHON:PATH',
32-
'-C', 'off',
33-
'-W', 7,
32+
'-C', 'off', # --consolecolors
33+
'-W', 7, # --consolewidth
3434
'--suite', 'suite',
3535
'--test', 'suite.test'])
3636

0 commit comments

Comments
 (0)