Changeset 33:d466f464c871 in pyenvjasmine for pyenvjasmine/runner.py


Ignore:
Timestamp:
Jan 19, 2018, 11:43:48 AM (6 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Fix for Runner.did_test_pass(), ensuring we catch failed tests
even if they do not appear in the "Failed:" report at the end of the
tests run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyenvjasmine/runner.py

    r30 r33  
    186186
    187187    def did_test_pass(self, stdout):
     188        if 'FAILED' in stdout:
     189            # it can happen that a test fails because of some timing issues
     190            # (timer error). In such case it may happen that the test does
     191            # not appear in the "Failed" report at the end, even if it
     192            # failed, because the execution is interrupted there (no more
     193            # tests are even run afterwards)
     194            #
     195            # in such case, we consider tests failed
     196            return False
     197        # Otherwise, look for a "Failed: 0" status, which we consider as
     198        # tests passing ok
    188199        for line in stdout.splitlines():
    189200            if 'Failed' in line:
Note: See TracChangeset for help on using the changeset viewer.