Skip to content

Commit

Permalink
test: add new failing test reported on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dvarrazzo committed Oct 13, 2022
1 parent 7f9d1ff commit 8d48f94
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def do_build(with_extension):
package_dir={"setproctitle": "pkg/setproctitle"},
ext_modules=ext_modules,
package_data={"setproctitle": ["py.typed"]},
extras_require={"test": ["pytest"]},
extras_require={"test": ["pytest", "requests"]},
cmdclass={"build_ext": setproctitle_build_ext},
zip_safe=False,
**kwargs,
Expand Down
20 changes: 20 additions & 0 deletions tests/setproctitle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,26 @@ def thread():
)


def test_fork_request_segfault():
run_script(
"""\
import os
import sys
import requests
import setproctitle
print(setproctitle.__version__)
pid = os.fork()
if not pid:
print('HTTP GET goole.com: ')
print(requests.get('https://google.com'))
sys.exit()
os.wait()
"""
)


# Support functions


Expand Down

0 comments on commit 8d48f94

Please # to comment.