• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

tools/22-Nov-2023-144103

typ/22-Nov-2023-4,4683,275

LICENSED22-Nov-202311.1 KiB201169

OWNERSD22-Nov-202377 54

README.chromiumD22-Nov-20231 KiB2924

README.rstD22-Nov-20232.5 KiB6952

pylintrcD22-Nov-20237.9 KiB272187

runD22-Nov-20233.4 KiB12087

setup.cfgD22-Nov-202326 32

setup.pyD22-Nov-20231.8 KiB6039

README.chromium

1Name: typ
2URL: https://github.com/dpranke/typ.git
3Version: 0.9.4
4Revision: d4caf6b40658b9c43bbfc5794d37ae34d6ff0486
5Security Critical: no
6License: Apache 2.0
7License File: LICENSE
8
9Description:
10
11typ is a simple wrapper around Python's unittest library that provides a
12somewhat nicer command-line interface, parallel test execution,
13code coverage support, and support for Chromium's JSON Results format.
14
15To update this copy of typ from the source repo (assuming you are in
16the same directory as this file).
17
18    # can just do "sed -n '/^   /p' README.chromium | bash -e"
19    cd ..
20    git clone https://github.com/dpranke/typ.git typ_new
21    revision=$(cd typ_new && git log -1 | head -1 | awk '{ print $2 }')
22    version=$(cd typ_new && python -m typ --version)
23    cp typ/OWNERS typ_new
24    cat typ/README.chromium | sed -e "s/^Version: .*/Version: $version/" \
25                                  -e "s/^Revision: .*/Revision: $revision/" \
26                                  > typ_new/README.chromium
27    rm -fr typ_new/.git typ_new/.gitignore typ/
28    mv typ_new typ
29

README.rst

1typ (Test Your Program)
2=======================
3typ is a simple program for testing command line executables and Python code.
4
5When testing Python code, it is basically a wrapper around the standard
6unittest module, but it provides the following bits of additional
7functionality:
8
9* Parallel test execution.
10* Clean output in the style of the Ninja build tool.
11* A more flexible mechanism for discovering tests from the
12  command line and controlling how they are run:
13
14  * Support for importing tests by directory, filename, or module.
15  * Support for specifying tests to skip, tests to run in parallel,
16    and tests that need to be run by themselves
17
18* Support for producing traces of test times compatible with Chrome's
19  tracing infrastructure (trace_viewer).
20* Integrated test coverage reporting (including parallel coverage).
21* Integrated support for debugging tests.
22* Support for uploading test results automatically to a server
23  (useful for continuous integration monitoring of test results).
24* An abstraction of operating system functionality called the
25  Host class. This can be used by other python code to write more
26  portable and easily testable code by wrapping the multiprocessing,
27  os, subprocess, and time modules.
28* Simple libraries for integrating Ninja-style statistics and line
29  printing into your own code (the Stats and Printer classes).
30* Support for processing arbitrary arguments from calling code to
31  test cases.
32* Support for once-per-process setup and teardown hooks.
33
34(These last two bullet points allow one to write tests that do not require
35Python globals).
36
37History
38-------
39
40typ originated out of work on the Blink and Chromium projects, as a way to
41provide a friendlier interface to the Python unittest modules.
42
43Work remaining
44--------------
45
46typ is still a work in progress, but it's getting close to being done.
47Things remaining for 1.0, roughly in priority order:
48
49- Implement a non-python file format for testing command line interfaces
50- Write documentation
51
52Possible future work
53--------------------
54
55- MainTestCase.check() improvements:
56
57  - check all arguments and show all errors at once?
58  - make multi-line regexp matches easier to follow?
59
60- --debugger improvements:
61
62  - make it skip the initial breakpoint?
63
64- Support testing javascript, java, c++/gtest-style binaries?
65- Support for test sharding in addition to parallel execution (so that
66  run-webkit-tests can re-use as much of the code as possible)?
67- Support for non-unittest runtest invocation (for run-webkit-tests,
68  other harnesses?)
69