uranusjr commented on code in PR #24432:
URL: https://github.com/apache/airflow/pull/24432#discussion_r896520476
##########
tests/jobs/test_local_task_job.py:
##########
@@ -462,7 +463,7 @@ def
test_failure_callback_called_by_airflow_run_raw_process(self, monkeypatch, t
assert len(lines) == 1 # invoke once
assert lines[0].startswith(ti.key.primary)
this_pid = str(os.getpid())
- assert this_pid not in lines[0]
+ assert not lines[0].endswith(f"pid: {this_pid}")
Review Comment:
Nah I’m thinking just something like
```python
match = re.match(r"^.+pid: (\d+)")
assert match is not None
assert int(match.group(0)) != os.getpid()
```
##########
tests/jobs/test_local_task_job.py:
##########
@@ -462,7 +463,7 @@ def
test_failure_callback_called_by_airflow_run_raw_process(self, monkeypatch, t
assert len(lines) == 1 # invoke once
assert lines[0].startswith(ti.key.primary)
this_pid = str(os.getpid())
- assert this_pid not in lines[0]
+ assert not lines[0].endswith(f"pid: {this_pid}")
Review Comment:
Nah I’m thinking just something like
```python
match = re.match(r"^.+pid: (\d+)$")
assert match is not None
assert int(match.group(0)) != os.getpid()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]