How can pytest-cov report coverage of python code that is executed as a result of pexpect.spawn?
问题 I have a Python project that uses pytest-cov for unit testing and code coverage measurement. The directory structure for my project is: rift-python +- rift # The package under test | +- __init__.py | +- __main__.py | +- cli_listen_handler.py | +- cli_session_handler.py | +- table.py | +- ...lots more... +- tests # The tests | +- test_table.py | +- test_sys_2n_l0_l1.py | +- ...more... +- README.md +- .travis.yml +- ... I use Travis to run pytest --cov=rift tests for every checkin, and I use