mirror of
https://github.com/meshtastic/python.git
synced 2026-05-19 14:01:09 -04:00
1.2.29
This commit is contained in:
@@ -32,7 +32,7 @@ from . import SerialInterface, TCPInterface, BROADCAST_NUM
|
||||
from pubsub import pub
|
||||
import time
|
||||
import sys
|
||||
import threading
|
||||
import threading, traceback
|
||||
from dotmap import DotMap
|
||||
|
||||
"""The interfaces we are using for our tests"""
|
||||
@@ -195,13 +195,18 @@ def testSimulator():
|
||||
"""
|
||||
logging.basicConfig(level=logging.DEBUG if False else logging.INFO)
|
||||
logging.info("Connecting to simulator on localhost!")
|
||||
iface = TCPInterface("localhost")
|
||||
iface.showInfo()
|
||||
iface.localNode.showInfo()
|
||||
iface.localNode.exitSimulator()
|
||||
iface.close()
|
||||
logging.info("Integration test successful!")
|
||||
sys.exit(0)</code></pre>
|
||||
try:
|
||||
iface = TCPInterface("localhost")
|
||||
iface.showInfo()
|
||||
iface.localNode.showInfo()
|
||||
iface.localNode.exitSimulator()
|
||||
iface.close()
|
||||
logging.info("Integration test successful!")
|
||||
sys.exit(0)
|
||||
except:
|
||||
print("Error while testing simulator:", sys.exc_info()[0])
|
||||
traceback.print_exc()
|
||||
sys.exit(1)</code></pre>
|
||||
</details>
|
||||
</section>
|
||||
<section>
|
||||
@@ -453,13 +458,18 @@ python3 -c 'from meshtastic.test import testSimulator; testSimulator()'</p></div
|
||||
"""
|
||||
logging.basicConfig(level=logging.DEBUG if False else logging.INFO)
|
||||
logging.info("Connecting to simulator on localhost!")
|
||||
iface = TCPInterface("localhost")
|
||||
iface.showInfo()
|
||||
iface.localNode.showInfo()
|
||||
iface.localNode.exitSimulator()
|
||||
iface.close()
|
||||
logging.info("Integration test successful!")
|
||||
sys.exit(0)</code></pre>
|
||||
try:
|
||||
iface = TCPInterface("localhost")
|
||||
iface.showInfo()
|
||||
iface.localNode.showInfo()
|
||||
iface.localNode.exitSimulator()
|
||||
iface.close()
|
||||
logging.info("Integration test successful!")
|
||||
sys.exit(0)
|
||||
except:
|
||||
print("Error while testing simulator:", sys.exc_info()[0])
|
||||
traceback.print_exc()
|
||||
sys.exit(1)</code></pre>
|
||||
</details>
|
||||
</dd>
|
||||
<dt id="meshtastic.test.testThread"><code class="name flex">
|
||||
|
||||
Reference in New Issue
Block a user