(tmp_path)
| 305 | |
| 306 | |
| 307 | def _make_hello_hello(tmp_path): |
| 308 | setup_py = '''\ |
| 309 | from setuptools import setup |
| 310 | |
| 311 | setup( |
| 312 | name='socks', |
| 313 | version='0.0.0', |
| 314 | py_modules=['socks'], |
| 315 | entry_points={'console_scripts': ['socks = socks:main']}, |
| 316 | ) |
| 317 | ''' |
| 318 | |
| 319 | main_py = '''\ |
| 320 | import sys |
| 321 | |
| 322 | def main(): |
| 323 | print(repr(sys.argv[1:])) |
| 324 | print('hello hello') |
| 325 | return 0 |
| 326 | ''' |
| 327 | tmp_path.joinpath('setup.py').write_text(setup_py) |
| 328 | tmp_path.joinpath('socks.py').write_text(main_py) |
| 329 | |
| 330 | |
| 331 | def test_simple_python_hook(tmp_path): |
no outgoing calls
no test coverage detected