Add MX-T40 BLE desktop controller and protocol documentation
Checks / tests (ubuntu-latest, 3.11) (push) Canceled after 0s
Checks / tests (ubuntu-latest, 3.14) (push) Canceled after 0s
Checks / tests (windows-latest, 3.11) (push) Canceled after 0s
Checks / tests (windows-latest, 3.14) (push) Canceled after 0s
Checks / package (push) Canceled after 0s
Checks / tests (ubuntu-latest, 3.11) (push) Canceled after 0s
Checks / tests (ubuntu-latest, 3.14) (push) Canceled after 0s
Checks / tests (windows-latest, 3.11) (push) Canceled after 0s
Checks / tests (windows-latest, 3.14) (push) Canceled after 0s
Checks / package (push) Canceled after 0s
This commit is contained in:
38 files changed
+2344
No files matched your search
@@ -0,0 +1,23 @@
|
||||
"""The protocol and CLI must remain usable on machines without a display."""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
|
||||
class ImportTests(unittest.TestCase):
|
||||
def test_headless_import_and_help(self):
|
||||
script = """
|
||||
import sys
|
||||
from controller import protocol, session, messages, cli
|
||||
assert 'tkinter' not in sys.modules
|
||||
assert 'bleak' not in sys.modules
|
||||
try:
|
||||
cli.main(['--help'])
|
||||
except SystemExit as exc:
|
||||
assert exc.code == 0
|
||||
assert 'tkinter' not in sys.modules
|
||||
"""
|
||||
result = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True)
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
self.assertIn("--transport", result.stdout)
|
||||
Reference in new issue
Block a user