They&#x27;re ultimately trying to match files, directories, method names, <i>and</i> class names they assume to contain tests.<p>You could certainly check it with<p><pre><code>    maybe.lower().startswith(test_string)
</code></pre>
and<p><pre><code>    maybe.lower().endswith(test_string)
</code></pre>
to accomplish part of what appears to be originally desired. But it&#x27;s just a part.<p>Python expects explicit behavior, and nose would do well to improve itself by providing interfaces for detecting, registering, and running tests by file, directory, method, or class in clear, provably correct ways.<p>It&#x27;d be far more reliable to start with a provable interface to `os.walk()` through a directory&#x2F;tree, grab the Python files, load &amp; test the classes to ensure they are of the desired type, and execute them--assuming here the tests are written via classes and not just modules full of random methods you hope include the word &#x27;test&#x27;, or you hope are actually meant for nose tests, and not something application-specific. Or perhaps offer a decorator for standalone methods when that is a developer&#x27;s chosen pattern. Or provide a single default directory that is searched, and a flag that allows a dev to override it. Same for files--provide a sane default filename that is searched via `os.walk()` for collecting tests, with a flag to specify a different filename where desired.<p>Slower, sure. But at least not completely fucked up and wrong. Once they can prove it works 100% of the time, then they can go about digging into making it better and faster. But for fuck&#x27;s sake, start with the simplest working solution and build from there. Especially when the problem has existed for more than 5 years.<p>EDIT: Oops, misplaced the lowers. It&#x27;s that time of the night when I shouldn&#x27;t be writing code.