iotests/testrunner: fix recognition of python tests

We should drop final '\n' before comparing with python3 shebang.

Fixes: d74c754c92
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210129090616.84145-1-vsementsov@virtuozzo.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2021-01-29 12:06:16 +03:00 committed by Kevin Wolf
parent 5101d00d2f
commit 9da4a314a0
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ class TestRunner(ContextManager['TestRunner']):
with f_test.open(encoding="utf-8") as f:
try:
if f.readline() == '#!/usr/bin/env python3':
if f.readline().rstrip() == '#!/usr/bin/env python3':
args.insert(0, self.env.python)
except UnicodeDecodeError: # binary test? for future.
pass