GLOB sdist-make: /tmp/tmpem5tjc7u/pytest-cram-0.2.2/setup.py py36 create: /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/py36 py36 installdeps: pytest==6.0.1, cram py36 inst: /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/.tmp/package/1/pytest-cram-0.2.2.zip py36 installed: attrs==20.1.0,cram==0.7,importlib-metadata==1.7.0,iniconfig==1.0.1,more-itertools==8.5.0,packaging==20.4,pluggy==0.13.1,py==1.9.0,pyparsing==2.4.7,pytest==6.0.1,pytest-cram @ file:///tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/.tmp/package/1/pytest-cram-0.2.2.zip,six==1.15.0,toml==0.10.1,zipp==3.1.0 py36 run-test-pre: PYTHONHASHSEED='4039191581' py36 run-test: commands[0] | py.test /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/py36/lib/python3.6/site-packages/pytest_cram ============================= test session starts ============================== platform linux -- Python 3.6.7, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 cachedir: .tox/py36/.pytest_cache rootdir: /tmp/tmpem5tjc7u/pytest-cram-0.2.2, configfile: tox.ini plugins: cram-0.2.2 collected 15 items .tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py . [ 6%] ..FF..F [ 53%] .tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_options.py . [ 60%] ...... [100%] =================================== FAILURES =================================== ___________________________________ test_env ___________________________________ testdir = def test_env(testdir): """Environment example. Should pass.""" testdir.makefile( ".t", r""" Check environment variables: $ echo "$LANG" C $ echo "$LC_ALL" C $ echo "$LANGUAGE" C $ echo "$TZ" GMT $ echo "$CDPATH" $ echo "$GREP_OPTIONS" $ echo "$CRAMTMP" .+ (re) $ echo "$TESTDIR" *{sep}test_env* (glob) $ ls "$TESTDIR" test_env.t $ echo "$TESTFILE" test_env.t $ pwd */test_env* (glob) """.format( sep=os.path.sep ), ) result = testdir.runpytest() > assert result.ret == 0 E assert == 0 E + where = .ret /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py:73: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.6.7, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 rootdir: /tmp/pytest-of-travis/pytest-7/test_env0 plugins: cram-0.2.2 collected 1 item test_env.t F [100%] =================================== FAILURES =================================== ______________________________ [cram] test_env.t _______________________________ --- test_env.t +++ test_env.t.err @@ -9,8 +9,10 @@ $ echo "$TZ" GMT $ echo "$CDPATH" + $ echo "$GREP_OPTIONS" + $ echo "$CRAMTMP" .+ (re) =========================== short test summary info ============================ FAILED test_env.t ============================== 1 failed in 0.06s =============================== __________________________________ test_fail ___________________________________ testdir = def test_fail(testdir): """Fail example. Should fail for several reasons.""" testdir.makefile( ".t", r""" Output needing escaping: $ printf '\00\01\02\03\04\05\06\07\010\011\013\014\016\017\020\021\022\n' foo $ printf '\023\024\025\026\027\030\031\032\033\034\035\036\037\040\047\n' bar Wrong output and bad regexes: $ echo 1 2 $ printf '1\nfoo\n1\n' +++ (re) foo\ (re) (re) Filler to force a second diff hunk: Offset regular expression: $ printf 'foo\n\n1\n' \d (re) """, ) # Subprocess needed for these weird shell commands result = testdir.runpytest() assert result.ret != 0 result.stdout.fnmatch_lines( [ "test_fail.t F*", "@@ -1,18 +1,18 @@", r"+*\x11\x12 (esc)", r"*\x1e\x1f ' (esc)", "+ 1", "@@ -20,5 +20,6 @@", "+ foo", > "*1 failed*", ] ) E Failed: nomatch: 'test_fail.t F*' E and: '============================= test session starts ==============================' E and: 'platform linux -- Python 3.6.7, pytest-6.0.1, py-1.9.0, pluggy-0.13.1' E and: 'rootdir: /tmp/pytest-of-travis/pytest-7/test_fail0' E and: 'plugins: cram-0.2.2' E and: 'collected 1 item' E and: '' E fnmatch: 'test_fail.t F*' E with: 'test_fail.t F [100%]' E nomatch: '@@ -1,18 +1,18 @@' E and: '' E and: '=================================== FAILURES ===================================' E and: '______________________________ [cram] test_fail.t ______________________________' E and: '--- test_fail.t' E and: '+++ test_fail.t.err' E exact match: '@@ -1,18 +1,18 @@' E nomatch: '+*\\x11\\x12 (esc)' E and: ' Output needing escaping:' E and: ' ' E and: " $ printf '\\00\\01\\02\\03\\04\\05\\06\\07\\010\\011\\013\\014\\016\\017\\020\\021\\022\\n'" E and: '- foo' E fnmatch: '+*\\x11\\x12 (esc)' E with: '+ \\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\x0b\\x0c\\x0e\\x0f\\x10\\x11\\x12 (esc)' E nomatch: "*\\x1e\\x1f ' (esc)" E and: " $ printf '\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\\040\\047\\n'" E and: '- bar' E fnmatch: "*\\x1e\\x1f ' (esc)" E with: "+ \\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f ' (esc)" E nomatch: '+ 1' E and: ' ' E and: ' Wrong output and bad regexes:' E and: ' ' E and: ' $ echo 1' E and: '- 2' E exact match: '+ 1' E nomatch: '@@ -20,5 +20,6 @@' E and: " $ printf '1\\nfoo\\n1\\n'" E and: '- +++ (re)' E and: '- foo\\ (re)' E and: '- (re)' E and: '+ 1' E and: '+ foo' E and: '+ 1' E and: ' ' E and: ' Filler to force a second diff hunk:' E and: ' ' E and: '@@ -20,5 +20,7 @@' E and: ' Offset regular expression:' E and: ' ' E and: " $ printf 'foo\\n\\n1\\n'" E and: '+ foo' E and: '+ ' E and: '+ 1' E and: ' ' E and: '- \\d (re)' E and: '' E and: '=========================== short test summary info ============================' E and: 'FAILED test_fail.t' E and: '============================== 1 failed in 0.06s ===============================' E remains unmatched: '@@ -20,5 +20,6 @@' /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py:121: Failed ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.6.7, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 rootdir: /tmp/pytest-of-travis/pytest-7/test_fail0 plugins: cram-0.2.2 collected 1 item test_fail.t F [100%] =================================== FAILURES =================================== ______________________________ [cram] test_fail.t ______________________________ --- test_fail.t +++ test_fail.t.err @@ -1,18 +1,18 @@ Output needing escaping: $ printf '\00\01\02\03\04\05\06\07\010\011\013\014\016\017\020\021\022\n' - foo + \x00\x01\x02\x03\x04\x05\x06\x07\x08\t\x0b\x0c\x0e\x0f\x10\x11\x12 (esc) $ printf '\023\024\025\026\027\030\031\032\033\034\035\036\037\040\047\n' - bar + \x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f ' (esc) Wrong output and bad regexes: $ echo 1 - 2 + 1 $ printf '1\nfoo\n1\n' - +++ (re) - foo\ (re) - (re) + 1 + foo + 1 Filler to force a second diff hunk: @@ -20,5 +20,7 @@ Offset regular expression: $ printf 'foo\n\n1\n' + foo + + 1 - \d (re) =========================== short test summary info ============================ FAILED test_fail.t ============================== 1 failed in 0.06s =============================== __________________________________ test_test ___________________________________ testdir = def test_test(testdir): """Test example. Should pass.""" testdir.makefile( ".t", r""" Simple commands: $ echo foo foo $ printf 'bar\nbaz\n' | cat bar baz Multi-line command: $ foo() { > echo bar > } $ foo bar Regular expression: $ echo foobarbaz foobar.* (re) Glob: $ printf '* \\foobarbaz {10}\n' \* \\fo?bar* {10} (glob) Literal match ending in (re) and (glob): $ echo 'foo\Z\Z\Z bar (re)' foo\Z\Z\Z bar (re) $ echo 'baz??? quux (glob)' baz??? quux (glob) Exit code: $ (exit 1) [1] Write to stderr: $ echo foo >&2 foo No newline: $ printf foo foo (no-eol) $ printf 'foo\nbar' foo bar (no-eol) $ printf ' ' (no-eol) $ printf ' \n ' (no-eol) $ echo foo foo $ printf foo foo (no-eol) Escaped output: $ printf '\00\01\02\03\04\05\06\07\010\011\013\014\016\017\020\021\022\n' \x00\x01\x02\x03\x04\x05\x06\x07\x08\t\x0b\x0c\x0e\x0f\x10\x11\x12 (esc) $ printf '\023\024\025\026\027\030\031\032\033\034\035\036\037\040\047\n' \x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f ' (esc) $ echo hi \x68\x69 (esc) $ echo '(esc) in output (esc)' (esc) in output (esc) $ echo '(esc) in output (esc)' (esc) in output \x28esc\x29 (esc) Command that closes a pipe: $ cat /dev/urandom | head -1 > /dev/null If Cram let Python's SIGPIPE handler get inherited by this script, we might see broken pipe messages. """, ) result = testdir.runpytest() > assert result.ret == 0 E assert == 0 E + where = .ret /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py:240: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.6.7, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 rootdir: /tmp/pytest-of-travis/pytest-7/test_test0 plugins: cram-0.2.2 collected 1 item test_test.t F [100%] =================================== FAILURES =================================== ______________________________ [cram] test_test.t ______________________________ --- test_test.t +++ test_test.t.err @@ -51,8 +51,9 @@ $ printf ' ' (no-eol) $ printf ' \n ' + + (no-eol) - (no-eol) $ echo foo foo $ printf foo =========================== short test summary info ============================ FAILED test_test.t ============================== 1 failed in 0.09s =============================== =========================== short test summary info ============================ FAILED .tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py::test_env FAILED .tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py::test_fail FAILED .tox/py36/lib/python3.6/site-packages/pytest_cram/tests/test_examples.py::test_test ========================= 3 failed, 12 passed in 5.62s ========================= ERROR: InvocationError for command /tmp/tmpem5tjc7u/pytest-cram-0.2.2/.tox/py36/bin/py.test .tox/py36/lib/python3.6/site-packages/pytest_cram (exited with code 1) ___________________________________ summary ____________________________________ ERROR: py36: commands failed write json report at: /tmp/tmpem5tjc7u/pytest-cram-0.2.2/result.json Time: 36.7 seconds