Skip to content

Commit b76e9fd

Browse files
committed
fix(cli): remove unused import and variable in test_compiler_coverage
Signed-off-by: VIFEX <vifextech@foxmail.com>
1 parent 2d02906 commit b76e9fd

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

Tools/WebServer/cli/fpb_cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,7 @@ def mem_read(self, addr: int, length: int, fmt: str = "hex") -> None:
619619
ascii_part = "".join(
620620
chr(b) if 0x20 <= b < 0x7F else "." for b in chunk
621621
)
622-
lines.append(
623-
f"0x{addr + i:08X}: {hex_part:<48s} {ascii_part}"
624-
)
622+
lines.append(f"0x{addr + i:08X}: {hex_part:<48s} {ascii_part}")
625623
result["hex_dump"] = "\n".join(lines)
626624
elif fmt == "raw":
627625
result["data"] = data.hex()

Tools/WebServer/tests/test_compiler_coverage.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
import tempfile
88
import unittest
9-
from unittest.mock import Mock, patch, call
9+
from unittest.mock import Mock, patch
1010

1111
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
1212

@@ -302,8 +302,6 @@ def test_marker_lines_resolved(self, mock_run, mock_parse):
302302
src.write("/*FPB_INJECT*/\nint WidgetIMP::type() const { return 0; }\n")
303303
src_path = src.name
304304

305-
# nm -l output must reference the actual source file basename
306-
src_basename = os.path.basename(src_path)
307305
mock_run.side_effect = [
308306
Mock(returncode=0, stderr=""), # compile
309307
# _resolve_functions_from_marker_lines nm -C -l

0 commit comments

Comments
 (0)