-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.
Milestone
Description
Currently, the _ActorType.exit()
method includes the following conditional check to prevent sys.exit()
from being executed during tests:
elif os.getenv('PYTEST_CURRENT_TEST', default=False): # noqa: PLW1508
self.log.debug(f'Not calling sys.exit({exit_code}) because Actor is running in an unit test')
This approach relies on environment variables to modify production code behavior, which is not ideal. Instead, tests should either configure the Actor to not to call sys.exit
or catch it.
There is some overlap with #389.
Related discussion: https://github.com/apify/apify-sdk-python/pull/390/files#r1948543716.
Metadata
Metadata
Assignees
Labels
t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.