2020-02-08 01:20:46 +00:00
|
|
|
"""
|
2020-02-09 19:59:22 +00:00
|
|
|
Needed on Windows.
|
|
|
|
|
|
|
|
This module is needed as the program entry point for invocation
|
|
|
|
with ``python -m <modulename>``. See the solution from @chrizzFTD
|
|
|
|
here:
|
|
|
|
|
|
|
|
https://github.com/goodboy/tractor/pull/61#issuecomment-470053512
|
2020-02-08 01:20:46 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
if __name__ == '__main__':
|
|
|
|
import multiprocessing
|
|
|
|
multiprocessing.freeze_support()
|
2020-02-09 19:59:22 +00:00
|
|
|
# ``tests/test_docs_examples.py::test_example`` will copy each
|
|
|
|
# script from this examples directory into a module in a new
|
|
|
|
# temporary dir and name it test_example.py. We import that script
|
|
|
|
# module here and invoke it's ``main()``.
|
2020-02-08 01:20:46 +00:00
|
|
|
from . import test_example
|
2021-02-24 23:51:32 +00:00
|
|
|
test_example.trio.run(test_example.main)
|