Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand conditions for recognizing main process #252

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Aug 23, 2020

  1. Expand conditions for recognizing main process

    Fork failures are not uncommon on Cygwin, which causes an exception in the constructor.
    Unfortunately, cleaning up the partially-initialized instance calls the `__del__` method, 
    which then raises another exception because `self.pid` never got set.
    This change should prevent the second exception.
    DWesl committed Aug 23, 2020
    Configuration menu
    Copy the full SHA
    ce3e539 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2020

  1. Change test to be more concise.

    Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
    DWesl and RonnyPfannschmidt committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    3348f61 View commit details
    Browse the repository at this point in the history
  2. Correct the sense of the test comparison.

    Forgot to put the `not` back in last time.
    DWesl committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    05343bf View commit details
    Browse the repository at this point in the history
  3. Test ForkedFunc behavior on fork failure

    Make sure fork fails, then check that the destructor does not raise an exception and cleans up after itself.
    DWesl committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    9cebab1 View commit details
    Browse the repository at this point in the history
  4. Fix exceptions in new test

    I forgot the keyword for a keyword-only arg, then referenced a variable that would have been assigned after an exception was raised.
    Add the keyword.
    Remove variable that will never be assigned due to exception.
    DWesl committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    e2dd0bb View commit details
    Browse the repository at this point in the history
  5. Add gc.collect to ensure destructor triggered

    I think refcounting semantics would trigger the deconstructor call while exiting the context manager in CPython, but this makes the test less dependent on CPython implementation details.
    DWesl committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    a318d82 View commit details
    Browse the repository at this point in the history