New issue 470: Crashes when too many things fail? https://bitbucket.org/hpk42/pytest/issue/470/crashes-when-too-many-things-fail
kwpolska: I’m testing [Nikola](http://getnikola.com/). I tried [this file](https://github.com/getnikola/nikola/blob/master/tests/test_integration.py): ``` $ py.test tests/test_integration.py ============================= test session starts ============================== platform linux2 -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2 collected 53 items tests/test_integration.py ..................................................... ========================== 53 passed in 97.54 seconds ========================== ``` Then I broke something. Specifically, [commented out the building part](https://github.com/getnikola/nikola/blob/master/tests/test_integration.py#L41). ``` ============================= test session starts ============================== platform linux2 -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2 collected 53 items tests/test_integration.py FFFFFFFFFFFFFF.FFFFFFFF..FFF..FFF..FFFFFF$ echo $? 3 ``` It just crashes. No idea why. I included the debug log, it says something to the effect of the CWD being inexistent. Then I asked --verbose. It crashes at this: ``` tests/test_integration.py:108: RelativeLinkTest2.test_avoid_double_slash_in_rss ``` I tried to isolate it. Here’s the fun part: when I removed everything that was not this test case or what it inherited from, I got a build that actually finished: ``` ============================= test session starts ============================== platform linux2 -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2 -- /home/kwpolska/virtualenvs/nikola-py2/bin/python2 collected 8 items tests/test_integration.py:80: EmptyBuildTest.test_build FAILED tests/test_integration.py:108: DemoBuildTest.test_avoid_double_slash_in_rss FAILED tests/test_integration.py:80: DemoBuildTest.test_build FAILED tests/test_integration.py:103: DemoBuildTest.test_index_in_sitemap FAILED tests/test_integration.py:108: RelativeLinkTest2.test_avoid_double_slash_in_rss FAILED tests/test_integration.py:80: RelativeLinkTest2.test_build FAILED tests/test_integration.py:147: RelativeLinkTest2.test_index_in_sitemap FAILED tests/test_integration.py:133: RelativeLinkTest2.test_relative_links FAILED =================================== FAILURES =================================== …snip… _______________ RelativeLinkTest2.test_avoid_double_slash_in_rss _______________ self = <tests.test_integration.RelativeLinkTest2 testMethod=test_avoid_double_slash_in_rss> def test_avoid_double_slash_in_rss(self): rss_path = os.path.join(self.target_dir, "output", "rss.xml") > rss_data = codecs.open(rss_path, "r", "utf8").read() tests/test_integration.py:110: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ filename = '/tmp/tmpk9BlUY/target/output/rss.xml', mode = 'rb' encoding = 'utf8', errors = 'strict', buffering = 1 def open(filename, mode='rb', encoding=None, errors='strict', buffering=1): """ Open an encoded file using the given mode and return a wrapped version providing transparent encoding/decoding. …snip… """ if encoding is not None: if 'U' in mode: # No automatic conversion of '\n' is done on reading and writing mode = mode.strip().replace('U', '') if mode[:1] not in set('rwa'): mode = 'r' + mode if 'b' not in mode: # Force opening of the file in binary mode mode = mode + 'b' > file = __builtin__.open(filename, mode, buffering) E IOError: [Errno 2] No such file or directory: u'/tmp/tmpk9BlUY/target/output/rss.xml' ../../virtualenvs/nikola-py2/lib/python2.7/codecs.py:881: IOError …snip… =========================== 8 failed in 0.51 seconds =========================== ``` What might be causing this? _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit