~hawkowl/twistedchecker/string-formatting-1165416

« back to all changes in this revision

Viewing changes to twistedchecker/core/util.py

  • Committer: zomux
  • Date: 2012-06-11 00:26:41 UTC
  • mfrom: (3.3.6 checkcopyrightheader)
  • Revision ID: raphael@uaca.com-20120611002641-4lm9rpm9atxsnu52
merged checkcopyrightheader

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""
 
2
Utility functions for twistedchecker.
 
3
"""
 
4
 
 
5
def isTestModule(modulename):
 
6
    """
 
7
    Determine whether a module is a test module
 
8
    by given module name.
 
9
    """
 
10
    return ".test." in modulename
 
11
 
 
12
 
 
13
 
 
14
def moduleNeedsTests(modulename):
 
15
    """
 
16
    Determine whether a module is a is a special module.
 
17
    like __init__
 
18
    """
 
19
    return not modulename.split(".")[-1].startswith("_")
 
20
 
 
21
 
 
22
 
 
23
__all__ = ["isTestModule", "isSpecialModule"]