mirror of
https://github.com/AkitaEngineering/Akita-Meshtastic-Meshcore-Bridge.git
synced 2026-07-05 09:21:41 +02:00
3cf9ea5d22
- Updated test_protocol.py to maintain consistent formatting and structure. - Adjusted tmp_no_default.ini to use consistent line endings. - Reformatted tmp_run_load.py and tmp_test_config.py for improved readability.
23 lines
656 B
Python
23 lines
656 B
Python
import configparser
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(scope="function")
|
|
def temp_config_file(tmp_path):
|
|
config_path = tmp_path / "config.ini"
|
|
parser = configparser.ConfigParser()
|
|
parser["DEFAULT"] = {
|
|
"MESHTASTIC_SERIAL_PORT": "/dev/test_meshtastic",
|
|
"EXTERNAL_TRANSPORT": "serial",
|
|
"SERIAL_PORT": "/dev/test_meshcore",
|
|
"SERIAL_BAUD_RATE": "19200",
|
|
"SERIAL_PROTOCOL": "json_newline",
|
|
"MESSAGE_QUEUE_SIZE": "50",
|
|
"LOG_LEVEL": "DEBUG",
|
|
"SERIAL_AUTO_SWITCH": "True",
|
|
}
|
|
with open(config_path, "w") as f:
|
|
parser.write(f)
|
|
yield str(config_path)
|