Skip to content

Commit 5ca422b

Browse files
authored
Formatting code extracts (#36670)
* Formatting code extracts Formatting code extracts * Update python.md WARNING: Could not lex literal_block as "python"
1 parent f488ad4 commit 5ca422b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/testing/python.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Each `Clusters.<ClusterName>.Structs.<StructName>` has:
217217

218218
Example:
219219

220-
```
220+
```python
221221
Clusters.BasicInformation.Structs.ProductAppearanceStruct(
222222
finish=Clusters.BasicInformation.Enums.ProductFinishEnum.kFabric,
223223
primaryColor=Clusters.BasicInformation.Enums.ColorEnum.kBlack)
@@ -293,7 +293,7 @@ Multi-path
293293

294294
Example:
295295

296-
```
296+
```python
297297
urgent = 1
298298

299299
await dev_ctrl ReadEvent(node_id, [(1,
@@ -359,7 +359,7 @@ asserts.assert_equal(ret[0].status, Status.Success, “write failed”)
359359

360360
Example:
361361

362-
```
362+
```python
363363
pai = await dev_ctrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.CertificateChainRequest(2))
364364
```
365365

@@ -387,7 +387,7 @@ class provides some helpers for Mobly integration.
387387

388388
use as:
389389

390-
```
390+
```python
391391
if __name__ == "__main__":
392392
default_matter_test_main()
393393
```
@@ -479,7 +479,7 @@ See
479479

480480
To create a controller on a new fabric:
481481

482-
```
482+
```python
483483
new_CA = self.certificate_authority_manager.NewCertificateAuthority()
484484

485485
new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1,
@@ -490,7 +490,7 @@ TH2 = new_fabric_admin.NewController(nodeId=112233)
490490

491491
Open a commissioning window (ECW):
492492

493-
```
493+
```python
494494
params = self.OpenCommissioningWindow(dev_ctrl=self.default_controller, node_id=self.dut_node_id)
495495
```
496496

@@ -499,7 +499,7 @@ the fabric admin.
499499

500500
Fabric admin for default controller:
501501

502-
```
502+
```python
503503
fa = self.certificate_authority_manager.activeCaList[0].adminList[0]
504504
second_ctrl = fa.new_fabric_admin.NewController(nodeId=node_id)
505505
```
@@ -577,13 +577,13 @@ running. To compile and install the wheel, do the following:
577577

578578
First activate the matter environment using either
579579

580-
```
580+
```shell
581581
. ./scripts/bootstrap.sh
582582
```
583583

584584
or
585585

586-
```
586+
```shell
587587
. ./scripts/activate.sh
588588
```
589589

@@ -592,7 +592,7 @@ subsequent setups as it is faster.
592592

593593
Next build the python wheels and create / activate a venv
594594

595-
```
595+
```shell
596596
./scripts/build_python.sh -i out/python_env
597597
source out/python_env/bin/activate
598598
```
@@ -609,15 +609,15 @@ that will be commissioned either over BLE or WiFi.
609609

610610
For example, to run the TC-ACE-1.2 tests against an un-commissioned DUT:
611611

612-
```
612+
```shell
613613
python3 src/python_testing/TC_ACE_1_2.py --commissioning-method on-network --qr-code MT:-24J0AFN00KA0648G00
614614
```
615615

616616
Some tests require additional arguments (ex. PIXITs or configuration variables
617617
for the CI). These arguments can be passed as sets of key/value pairs using the
618618
`--<type>-arg:<value>` command line arguments. For example:
619619

620-
```
620+
```shell
621621
--int-arg PIXIT.ACE.APPENDPOINT:1 --int-arg PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff --string-arg PIXIT.ACE.APPATTRIBUTE:OnOff
622622
```
623623

0 commit comments

Comments
 (0)