Skip to main content

No project description provided

Project description

typ is a simple program for testing command line executables and Python code.

When testing Python code, it is basically a wrapper around the standard unittest module, but it provides the following bits of additional functionality:

  • Parallel test execution.

  • Clean output in the style of the Ninja build tool.

  • A more flexible mechanism for discovering tests from the command line and controlling how they are run:

    • Support for importing tests by directory, filename, or module.

    • Support for specifying tests to skip, tests to run in parallel, and tests that need to be run by themselves

  • Support for producing traces of test times compatible with Chrome’s tracing infrastructure (trace_viewer).

  • Integrated test coverage reporting (including parallel coverage).

  • Integrated support for debugging tests.

  • Support for uploading test results automatically to a server (useful for continuous integration monitoring of test results).

  • An abstraction of operating system functionality called the Host class. This can be used by other python code to write more portable and easily testable code by wrapping the multiprocessing, os, subprocess, and time modules.

  • Simple libraries for integrating Ninja-style statistics and line printing into your own code (the Stats and Printer classes).

  • Support for processing arbitrary arguments from calling code to test cases.

  • Support for once-per-process setup and teardown hooks.

(These last two bullet points allow one to write tests that do not require Python globals).

History

typ originated out of work on the Blink and Chromium projects, as a way to provide a friendlier interface to the Python unittest modules.

Work remaining

typ is still a work in progress, but it’s getting close to being done. Things remaining for 1.0, roughly in priority order:

  • Implement a non-python file format for testing command line interfaces

  • Write documentation

Possible future work

  • MainTestCase.check() improvements:

    • check all arguments and show all errors at once?

    • make multi-line regexp matches easier to follow?

  • –debugger improvements:

    • make it skip the initial breakpoint?

  • Support testing javascript, java, c++/gtest-style binaries?

  • Support for test sharding in addition to parallel execution (so that run-webkit-tests can re-use as much of the code as possible)?

  • Support for non-unittest runtest invocation (for run-webkit-tests, other harnesses?)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typ-0.11.0.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

typ-0.11.0-py2.py3-none-any.whl (58.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file typ-0.11.0.tar.gz.

File metadata

  • Download URL: typ-0.11.0.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for typ-0.11.0.tar.gz
Algorithm Hash digest
SHA256 cf65a5bdb7cbd50260c6a65f137f118019f74a2898752b3b58fcb808690947f4
MD5 d0938cb4c311c0b0247ccf6fc63e87d0
BLAKE2b-256 e5f897e2a21f9b373ff4ed79eb3b8045329276f1adc625b3ed7babf5d995c3e0

See more details on using hashes here.

File details

Details for the file typ-0.11.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for typ-0.11.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 00436dc03c2a19fb842bab720fc817a407be0b69ce442fe59c367991d9ae93e6
MD5 7f0ac1d0d54830074c2966d4bfec0c52
BLAKE2b-256 3d2e813d1615859c518e0bc8d2340b7774fad5fcfce3d9a6f1b87e898bfffddf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page