File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111from .. import BROADCAST_ADDR , LOCAL_ADDR
1212from ..mesh_interface import MeshInterface , _timeago
1313from ..node import Node
14+ from ..slog import LogSet
15+ from ..powermon import SimPowerSupply
1416
1517# TODO
1618# from ..config import Config
@@ -47,11 +49,15 @@ def test_MeshInterface(capsys):
4749
4850 iface .localNode .localConfig .lora .CopyFrom (config_pb2 .Config .LoRaConfig ())
4951
52+ # Also get some coverage of the structured logging/power meter stuff by turning it on as well
53+ log_set = LogSet (iface , None , SimPowerSupply ())
54+
5055 iface .showInfo ()
5156 iface .localNode .showInfo ()
5257 iface .showNodes ()
5358 iface .sendText ("hello" )
5459 iface .close ()
60+ log_set .close ()
5561 out , err = capsys .readouterr ()
5662 assert re .search (r"Owner: None \(None\)" , out , re .MULTILINE )
5763 assert re .search (r"Nodes" , out , re .MULTILINE )
You can’t perform that action at this time.
0 commit comments