mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-10 10:52:53 +02:00
refactor: remove unused imports from test files for cleaner code
This commit is contained in:
@@ -7,11 +7,7 @@ airtime duty-cycle, TX mode (forward/monitor/no_tx), and config reloading.
|
||||
"""
|
||||
import asyncio
|
||||
import base64
|
||||
import copy
|
||||
import math
|
||||
import time
|
||||
from collections import OrderedDict
|
||||
from typing import Optional
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -13,11 +13,9 @@ objects to verify:
|
||||
"""
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from pymc_core.protocol import Packet, PathUtils
|
||||
from pymc_core.protocol.constants import (
|
||||
MAX_PATH_SIZE,
|
||||
ROUTE_TYPE_FLOOD,
|
||||
ROUTE_TYPE_TRANSPORT_FLOOD,
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from repeater.handler_helpers.mesh_cli import MeshCLI
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import asyncio
|
||||
import time
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
@@ -2,7 +2,6 @@ import io
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
import cherrypy
|
||||
import pytest
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from repeater.handler_helpers.repeater_cli import MeshCLI, RepeaterCLI
|
||||
from repeater.identity_manager import IdentityManager
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
from unittest.mock import MagicMock, patch
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import asyncio
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ to end. paho-mqtt's network layer is mocked so no real broker is required.
|
||||
"""
|
||||
|
||||
import json
|
||||
import math
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from repeater.airtime import AirtimeManager
|
||||
|
||||
@@ -5,7 +5,6 @@ When mesh.path_hash_mode is 1 or 2, flood 0-hop packets (e.g. adverts) sent via
|
||||
dispatcher.send_packet() must have path_len encoding set so get_path_hash_size()
|
||||
returns 2 or 3. The dispatcher applies this in send_packet() before transmit.
|
||||
"""
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ rather than mocking the protocol layer. Covers:
|
||||
- Max-hop boundary enforcement per hash size
|
||||
"""
|
||||
import struct
|
||||
from collections import OrderedDict
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
@@ -23,7 +22,6 @@ from pymc_core.protocol.constants import (
|
||||
PATH_HASH_COUNT_MASK,
|
||||
PATH_HASH_SIZE_SHIFT,
|
||||
PAYLOAD_TYPE_TRACE,
|
||||
PH_TYPE_SHIFT,
|
||||
ROUTE_TYPE_DIRECT,
|
||||
ROUTE_TYPE_FLOOD,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import patch
|
||||
|
||||
import cherrypy
|
||||
import pytest
|
||||
|
||||
Reference in New Issue
Block a user