Use type comments to support older python3 interpreters that can't
handle type hints (such as 3.4).
Change-Id: I3599311dfcc172344c759f8c0e22af640759f1f5
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
return session_output_location
return session_output_location
-def validate_trace(trace_location, tap) -> bool:
+def validate_trace(trace_location, tap):
# type: (pathlib.Path, lttngtest.TapGenerator) -> bool
success = True
unknown_event_count = 0
# type: (pathlib.Path, lttngtest.TapGenerator) -> bool
success = True
unknown_event_count = 0
Create an application to trace.
"""
Create an application to trace.
"""
- def __init__(self, binary_path: pathlib.Path, environment: "Environment"):
- self._environment: Environment = environment
+ def __init__(self, binary_path, environment):
+ # type: (pathlib.Path, Environment)
+ self._environment = environment # type: Environment
self._has_returned = False
test_app_env = os.environ.copy()
self._has_returned = False
test_app_env = os.environ.copy()
test_app_args, env=test_app_env
)
test_app_args, env=test_app_env
)
- def wait_for_exit(self) -> None:
+ def wait_for_exit(self):
+ # type: () -> None
if self._process.wait() != 0:
raise RuntimeError(
"Test application has exit with return code `{return_code}`".format(
if self._process.wait() != 0:
raise RuntimeError(
"Test application has exit with return code `{return_code}`".format(
- def launch_trace_test_constructor_application(
- self
- ) -> TraceTestApplication:
+ def launch_trace_test_constructor_application(self):
+ # type () -> TraceTestApplication
"""
Launch an application that will trace from within constructors.
"""
"""
Launch an application that will trace from within constructors.
"""