Skip to content

Commit

Permalink
smbtorture: return None from test_smbtorture
Browse files Browse the repository at this point in the history
Newer pytest expects test entry-point functions to return None. On CI
machines (with CentOS9-stream and Python-3.9) it also yields a warn
messages.

Signed-off-by: Shachar Sharon <ssharon@ibm.com>
  • Loading branch information
Shachar Sharon authored and spuiuk committed Oct 12, 2023
1 parent 3844357 commit a95adc0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions testcases/smbtorture/test_smbtorture.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,12 @@ def generate_smbtorture_tests(
@pytest.mark.parametrize(
"share_name,test", generate_smbtorture_tests(os.getenv("TEST_INFO_FILE"))
)
def test_smbtorture(share_name: str, test: str) -> bool:
def test_smbtorture(share_name: str, test: str) -> None:
ret = smbtorture(share_name, test, output)
if os.path.exists(output):
os.unlink(output)
if not ret:
pytest.fail("Failure in running test - %s" % (test), pytrace=False)
return True


if __name__ == "__main__":
Expand Down

0 comments on commit a95adc0

Please sign in to comment.