-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(test_esptool): Migrate tests from unittest to pytest
- Loading branch information
1 parent
40e6afd
commit 1d18196
Showing
8 changed files
with
258 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--port", action="store", default="/dev/ttyUSB0", help="Serial port" | ||
) | ||
parser.addoption("--chip", action="store", default="esp32", help="Chip type") | ||
parser.addoption("--baud", action="store", default=115200, help="Baud rate") | ||
parser.addoption( | ||
"--with_trace", | ||
action="store_true", | ||
default=False, | ||
help="Trace interactions", | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
global arg_port, arg_chip, arg_baud, arg_trace | ||
arg_port = config.getoption("--port") | ||
arg_chip = config.getoption("--chip") | ||
arg_baud = config.getoption("--baud") | ||
arg_trace = config.getoption("--with_trace") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.