Skip to content

Commit

Permalink
fix snippets tests on linux
Browse files Browse the repository at this point in the history
Signed-off-by: Jos Verlinde <[email protected]>
  • Loading branch information
Josverl committed Oct 15, 2023
1 parent 049d2bc commit 897dd24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion snippets/check_stm32/check_pyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@


can = CAN(1, CAN.LOOPBACK)
can.setfilter(0, CAN.LIST16, 0, (123, 124, 125, 126))
can.setfilter(0, CAN.LIST16, 0, (123, 124, 125, 126)) # stubs-ignore : version<=1.18.0
can.send("message!", 123) # send a message with id 123
can.recv(0) # receive message on FIFO 0

Expand Down
2 changes: 1 addition & 1 deletion snippets/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def install_stubs(
cmd = f"pip install {stubsource} --target {tsc_path} --no-user"

try:
subprocess.run(cmd, shell=False, check=True, capture_output=True, text=True)
subprocess.run(cmd, shell=True, check=True, capture_output=True, text=True)
except subprocess.CalledProcessError as e:
# skip test if source connot be found
print(f"{e.stderr}")
Expand Down
4 changes: 2 additions & 2 deletions snippets/test_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
}

SOURCES = ["local", "pypi"]
VERSIONS = ["latest", "v1.21.0", "v1.20.0"] # , "v1.19.1"]
VERSIONS = ["latest", "v1.21.0", "v1.20.0", "v1.19.1", "v1.18"]


def pytest_generate_tests(metafunc: pytest.Metafunc):
Expand Down Expand Up @@ -156,7 +156,7 @@ def test_pyright(
try:
# run pyright in the folder with the check_scripts to allow modules to import each other.
result = subprocess.run(
cmd, shell=False, capture_output=True, cwd=snip_path.as_posix()
cmd, shell=True, capture_output=True, cwd=snip_path.as_posix()
)
except OSError as e:
raise e
Expand Down

0 comments on commit 897dd24

Please sign in to comment.