Skip to content

Commit b4f3467

Browse files
committed
docs: Update - save signal doesn't work on Windows
Signed-off-by: Arkady Gilinsky <[email protected]>
1 parent cd2a914 commit b4f3467

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

coverage/cmdline.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ class Opts:
196196
help=(
197197
"Define a system signal that will trigger coverage report save operation. " +
198198
"It is important that target script do not intercept this signal. " +
199-
"Currently supported options are: USR1, USR2."
199+
"Currently supported options are: USR1, USR2. " +
200+
"This feature does not work on Windows."
200201
),
201202
)
202203
show_contexts = optparse.make_option(
@@ -869,6 +870,9 @@ def do_run(self, options: optparse.Values, args: list[str]) -> int:
869870
self.coverage.load()
870871

871872
if options.save_signal:
873+
if env.WINDOWS:
874+
show_help("Signals are not supported in Windows environment.")
875+
return ERR
872876
if options.save_signal.upper() == 'USR1':
873877
signal.signal(signal.SIGUSR1, self.do_signal_save)
874878
elif options.save_signal.upper() == 'USR2':

doc/cmd.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ There are many options:
137137
Define a system signal that will trigger coverage
138138
report save operation. It is important that target
139139
script do not intercept this signal. Currently
140-
supported options are: USR1, USR2.
140+
supported options are: USR1, USR2. This feature does
141+
not work on Windows.
141142
--source=SRC1,SRC2,...
142143
A list of directories or importable names of code to
143144
measure.
@@ -148,7 +149,7 @@ There are many options:
148149
--rcfile=RCFILE Specify configuration file. By default '.coveragerc',
149150
'setup.cfg', 'tox.ini', and 'pyproject.toml' are
150151
tried. [env: COVERAGE_RCFILE]
151-
.. [[[end]]] (sum: 1+s3B5JO5I)
152+
.. [[[end]]] (sum: X8Kbvdq2+f)
152153
153154
If you want :ref:`branch coverage <branch>` measurement, use the ``--branch``
154155
flag. Otherwise only statement coverage is measured.

0 commit comments

Comments
 (0)