Mentions légales du service

Skip to content

should.py fails when there is no test to process

This especially happens when the NO_LAUNCHER directive is used and a launcher is provided to should.py. In such a case should.py fails with:

Traceback (most recent call last):
  File "should.py", line 826, in <module>
    status = fs.test(variables = variables, cd = args.cd, cd_same = args.cd_same, output = args.output, verbose = args.verbose)
  File "should.py", line 788, in test
    write_to_file(filename_without_ext + OUT_TAP, s.tap())
  File "should.py", line 736, in tap
    s += '\n'.join(map(TestLine.tap, self.tests))
  File "should.py", line 340, in tap
    s.append(self.str_status(names=names, colorize=colorize))
  File "should.py", line 332, in str_status
    s += self.str_additional_status(verbose)
  File "should.py", line 498, in str_additional_status
    s += ' (%s/%s)' % (self.count, self.expected_count if self.expected_count is not None else '+')
AttributeError: 'TestLine' object has no attribute 'count'