Lines Matching +full:2001 +full:- +full:08 +full:- +full:14
6 # COVERAGE.PY -- COVERAGE TESTING
8 # Gareth Rees, Ravenbrook Limited, 2001-12-04
9 # Ned Batchelder, 2004-12-12
21 # See [GDR 2001-12-04a] for the command-line interface, programmatic
22 # interface and limitations. See [GDR 2001-12-04b] for requirements and
29 coverage.py -x [-p] MODULE.py [ARG1 ARG2 ...]
30 Execute module, passing the given command-line arguments, collecting
31 coverage data. With the -p option, write to a temporary file containing
34 coverage.py -e
37 coverage.py -c
38 Collect data from multiple coverage files (as created by -p option above)
41 coverage.py -r [-m] [-o dir1,dir2,...] FILE1 FILE2 ...
42 Report on the statement coverage for the given files. With the -m
45 coverage.py -a [-d dir] [-o dir1,dir2,...] FILE1 FILE2 ...
48 the -d option, make the copies in that directory. Without the -d
51 -o dir,dir2,...
54 e.g. python coverage.py -i -r -o c:\python23,lib\enthought\traits
180 # Multi-line tests introducing suites have to get charged to their
245 self.doElse(node.tests[-1][1], node)
254 prev = node.handlers[i-1][2]
260 self.doElse(node.handlers[-1][2], node)
295 # specify both -r and -a without doing double work.
317 # See [van Rossum 2001-07-20b, 9.2] for an explanation of sys.settrace and
319 # See [van Rossum 2001-07-20a, 3.2] for a description of frame and code
342 '-a': 'annotate',
343 '-c': 'collect',
344 '-d:': 'directory=',
345 '-e': 'erase',
346 '-h': 'help',
347 '-i': 'ignore-errors',
348 '-m': 'show-missing',
349 '-p': 'parallel-mode',
350 '-r': 'report',
351 '-x': 'execute',
352 '-o:': 'omit=',
386 help_fn("You must specify at least one of -e, -x, -c, -r, or -a.")
390 self.parallel_mode = settings.get('parallel-mode')
410 ignore_errors = settings.get('ignore-errors')
411 show_missing = settings.get('show-missing')
447 self.nesting -= 1
532 # normalized case). See [GDR 2001-12-04b, 3.3].
579 # and (4), a map of line numbers to multi-line line number ranges, for
588 if not os.path.exists(filename[:-1]):
592 filename = filename[:-1]
618 tree = tree[-1]
652 for j in range(i-1, 0, -1):
656 lineno_colon = self.last_line_of_tree(tree[j-1])
659 # Find the line number of the first non-terminal
727 # [1,2,3,4,5,10,11,12,13,14] and lines = [1,2,5,10,11,13,14] then
728 # format_lines will return "1-2, 5-11, 13-14".
753 return "%d-%d" % (start, end)
824 fmt_name = "%%- %ds " % max_name
834 print >>file, "-" * len(header)
842 m = n - len(missing)
860 print >>file, "-" * len(header)
915 # See [GDR 2001-12-04b, 3.2].
925 dest.write('- ')
983 # Command-line interface.
990 # [GDR 2001-12-04a] "Statement coverage for Python"; Gareth Rees;
991 # Ravenbrook Limited; 2001-12-04;
992 # <http://www.nedbatchelder.com/code/modules/rees-coverage.html>.
994 # [GDR 2001-12-04b] "Statement coverage for Python: design and
995 # analysis"; Gareth Rees; Ravenbrook Limited; 2001-12-04;
996 # <http://www.nedbatchelder.com/code/modules/rees-design.html>.
998 # [van Rossum 2001-07-20a] "Python Reference Manual (releae 2.1.1)";
999 # Guide van Rossum; 2001-07-20;
1002 # [van Rossum 2001-07-20b] "Python Library Reference"; Guido van Rossum;
1003 # 2001-07-20; <http://www.python.org/doc/2.1.1/lib/lib.html>.
1008 # 2001-12-04 GDR Created.
1010 # 2001-12-06 GDR Added command-line interface and source code
1013 # 2001-12-09 GDR Moved design and interface to separate documents.
1015 # 2001-12-10 GDR Open cache file as binary on Windows. Allow
1016 # simultaneous -e and -x, or -a and -r.
1018 # 2001-12-12 GDR Added command-line help. Cache analysis so that it
1019 # only needs to be done once when you specify -a and -r.
1021 # 2001-12-13 GDR Improved speed while recording. Portable between
1024 # 2002-01-03 GDR Module-level functions work correctly.
1026 # 2002-01-07 GDR Update sys.path when running a file with the -x option,
1030 # 2004-12-12 NMB Significant code changes.
1031 # - Finding executable statements has been rewritten so that docstrings and
1034 # - Lines can be excluded from consideration, even entire suites of lines.
1035 # - The filesystem cache of covered lines can be disabled programmatically.
1036 # - Modernized the code.
1038 # 2004-12-14 NMB Minor tweaks. Return 'analysis' to its original behavior
1042 # 2004-12-31 NMB Allow for keyword arguments in the module global functions.
1045 # 2005-12-02 NMB Call threading.settrace so that all threads are measured.
1049 # 2005-12-03 NMB coverage.py can now measure itself.
1051 # 2005-12-04 NMB Adapted Greg Rogers' patch for using relative filenames,
1054 # 2006-07-23 NMB Applied Joseph Tate's patch for function decorators.
1056 # 2006-08-21 NMB Applied Sigve Tjora and Mark van der Wal's fixes for argument
1059 # 2006-08-22 NMB Applied Geoff Bache's parallel mode patch.
1061 # 2006-08-23 NMB Refactorings to improve testability. Fixes to command-line
1064 # 2006-08-25 NMB "#pragma: nocover" is excluded by default.
1066 # 2006-09-10 NMB Properly ignore docstrings and other constant expressions that
1070 # 2006-09-17 NMB coverage.erase() shouldn't clobber the exclude regex.
1074 # 2007-07-21 NMB In reports, ignore code executed from strings, since we can't
1080 # 2007-07-22 NMB Python 2.5 now fully supported. The method of dealing with
1081 # multi-line statements is now less sensitive to the exact line that Python
1085 # 2007-07-23 NMB Now Python 2.5 is *really* fully supported: the body of the
1088 # 2007-07-29 NMB Better packaging.
1090 # 2007-09-30 NMB Don't try to predict whether a file is Python source based on
1096 # Copyright 2001 Gareth Rees. All rights reserved.
1097 # Copyright 2004-2007 Ned Batchelder. All rights reserved.
1124 # $Id: coverage.py 79 2007-10-01 01:01:52Z nedbat $