Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#26331 closed Bug (fixed)

Tests functions with typos are not detected by test runner

Reported by: George Marshall Owned by: George Marshall
Component: Testing framework Version:
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I noticed a couple of tests that either have typos or are missing the "test" keyword. This is causing them to not be detected by the test runner.

Attachments (1)

test-functions.txt (21.1 KB ) - added by Moritz Sichert 9 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by George Marshall, 9 years ago

Used the following regex to find these

^[ \t]+def (?!test).*\(self\):$

by Moritz Sichert, 9 years ago

Attachment: test-functions.txt added

comment:2 by Moritz Sichert, 9 years ago

I ran

git grep -E '^[ \t]+def .*\(self\):$' | grep -vE 'def (__|test|setUp|tearDown)'

in the tests directory to generate the attached file. For me it doesn't look like it contains any methods that should be discovered by the test runner.

comment:3 by George Marshall, 9 years ago

The description on the ticket is kind of ambiguous. Look at the attached pull request. This is making reference to test methods that have assertions that are not being run.

comment:4 by Moritz Sichert, 9 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

Oh, I didn't see your pull request.
You are right, those two methods should be discovered.

comment:5 by Claude Paroz <claude@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 75614f6d:

Fixed #26331 -- Fixed test function names with typos

comment:6 by Tim Graham <timograham@…>, 9 years ago

In 4702c1a:

[1.9.x] Fixed #26331 -- Fixed test function names with typos

Backport of 75614f6d4c1a3fe779a75eb3e787452cccd1d814 from master

comment:7 by Tim Graham <timograham@…>, 9 years ago

In 567658f1:

[1.8.x] Fixed #26331 -- Fixed test function names with typos

Backport of 75614f6d4c1a3fe779a75eb3e787452cccd1d814 from master

Note: See TracTickets for help on using tickets.
Back to Top