mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-08-08 14:42:31 -04:00
Correct code-block lexers
Changing `bash` lexer to `console` because it is appropriate most of the time. Then after a manual review, some lexer have been changed. I used `text` each time I was unsure, and for prompt outputs. The page `/developer/building/qubes-iso-building.rst` still need to be reviewed (look for lines starting with `$ #`). I'm not sure about the Windows pages, should we use [doscon](https://pygments.org/docs/lexers/#pygments.lexers.shell.MSDOSSessionLexer) or `powershell`? Is there an appropriate lexer for `guid.conf` content? **Statistics - Before** 870 bash 9 python 9 c 2 yaml **Statistics - After** 684 console 111 text 44 bash 16 yaml 9 systemd 9 c 8 python 4 ini 4 doscon 2 markdown 2 desktop 1 xorg.conf 1 xml+jinja 1 xml 1 kconfig 1 html This suggests that the default lexer should be `console`.
This commit is contained in:
parent
b53776e1eb
commit
ba399ac488
98 changed files with 1022 additions and 1029 deletions
|
@ -20,19 +20,19 @@ For example, the following code can be used to run the ``qui-domains`` tool usin
|
|||
# qapp = qubesadmin.Qubes()
|
||||
# dispatcher = qubesadmin.events.EventsDispatcher(qapp)
|
||||
# stats_dispatcher = qubesadmin.events.EventsDispatcher(qapp, api_method='admin.vm.Stats')
|
||||
|
||||
|
||||
import qubesadmin.tests.mock_app as mock_app
|
||||
qapp = mock_app.MockQubesComplete()
|
||||
dispatcher = mock_app.MockDispatcher(qapp)
|
||||
stats_dispatcher = mock_app.MockDispatcher(
|
||||
qapp, api_method='admin.vm.Stats')
|
||||
|
||||
|
||||
# continue as normal
|
||||
|
||||
|
||||
To run a mocked program without installing it in a qube, remember to extend PYTHONPATH appropriately, for example:
|
||||
|
||||
.. code:: bash
|
||||
.. code:: console
|
||||
|
||||
~/qubes-sources/manager $ PYTHONPATH=../core-admin-client:. python3 qui/tray/domains.py
|
||||
|
||||
|
@ -103,7 +103,7 @@ The same mock Qubes can also be used to write tests. You can use the wrappers ab
|
|||
|
||||
# this is an excerpt from tests for Qubes Global Config tool
|
||||
clockvm_combo.set_active_id('test-blue')
|
||||
|
||||
|
||||
mock_qapp.expected_calls[('dom0', 'admin.property.Set',
|
||||
'clockvm', b'test-blue')] = b'0\x00'
|
||||
basics_handler.save()
|
||||
|
@ -114,4 +114,4 @@ If the call is made correctly, the test will continue successfully; if an unexpe
|
|||
Caution: the mock Qubes object does not react to changes like a normal Qubes object does. Further queries to the test object will continue to return initial values.
|
||||
|
||||
.. |Qubes Manager running MockQubesComplete| image:: /attachment/doc/doc-mock-app-ex1.png
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue