run_chdir.py 442 B

12345678910111213141516
  1. # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
  2. # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
  3. copy("src", "out")
  4. run("""
  5. coverage run chdir.py
  6. coverage report
  7. """, rundir="out", outfile="stdout.txt")
  8. contains("out/stdout.txt",
  9. "Line One",
  10. "Line Two",
  11. "chdir"
  12. )
  13. doesnt_contain("out/stdout.txt", "No such file or directory")
  14. clean("out")