| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -821,5 +821,20 @@ def test_crashed(self): | |
| randomize=True) | ||
|
|
||
|
|
||
| class TempCwdTestCase(unittest.TestCase): | ||
|
Comment thread
Outdated
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityPlease move this test to test_support.py which tests test.support. test_regrtest tests Lib/test/libregrtest/.
Sorry, something went wrong.
All reactions
|
||
| @unittest.skipUnless(hasattr(os, "fork"), "test requires os.fork") | ||
| def test_forked_child(self): | ||
| import sys | ||
|
Comment thread
Outdated
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIs it used?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityOpps, a left over from a debug print to sys.stderr
Sorry, something went wrong.
All reactions
|
||
| with support.temp_cwd() as cwd: | ||
| pid = os.fork() | ||
| if pid != 0: | ||
| # parent | ||
| os.waitpid(pid, 0) | ||
| self.assertTrue(os.path.isdir(cwd), "directory was removed "+cwd) | ||
| if pid == 0: | ||
| # terminate the child in order to not confuse the test runner | ||
| os._exit(0) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe test is non obvious, can you please add a short comment explaining why you test the pid?
I guess that it's test to avoid that two processes try to remove the directory if the parent uses fork()?
Add bpo-30028 in the comment.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.