{ "info": { "author": "Gergely Polonkai", "author_email": "gergo@gt2.io", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "GT2 Test Runner\n===============\n\nAlternative unittest test runner with colourised output and per-test coverage support, from the\ndevs of getbenchmarked.io.\n\nIt extends the standard :code:`unittest.TextTestRunner` class, with a bunch of tweaks:\n\n- with no verbosity set, it will print only one character for each test. With a verbosity of 1,\n one line for each test is printed\n- if the `colorama` library is installed, the dot or the test outcome text is printed in colours\n- if the `coverage` package is installed, and the `coverage_sources` parameter is set on the\n runner, it will measure test coverage, both for each test, and overall\n- if verbosity is above 1, it will print coverage data for each test\n- if requested with the `rerun_log` parameter, tests that fail or raise an exception are collected\n in the specified file, so they can be re-run later\n\nPlanned features\n----------------\n\n- display a countdown in verbose mode, so you can see how many tests are remaining\n- collect the output of failing/errored tests to a file to be analysed later\n\nKnown problems\n--------------\n\nWhen verbosity is above one (thus, per-test coverage report is printed), it can\u2019t print the\noverall coverage data. We are working on it.\n\nRight now, the library only supports Python 3, and probably won\u2019t run in Python 2 without a lot of\ntweaks. As we use only Python 3 at getbenchmarked.io, we didn\u2019t have the intention to support\nPython 2; if you need it and do the tweaks, please send us a PR!\n\nInstallation\n------------\n\n1. Recommended installation is via **pip**, inside a **virtualenv**\n\n To get it from **PyPI**::\n\n $ pip install gt2_test_runner\n\n If you want a bleeding-edge version from GitHub::\n\n $ pip install -e git+https://github.com/GT2-io/gt2-test-runner#egg=gt2-test-runner\n\n Downloading the package source and installing it yourself is also an option. To do so::\n\n $ python setup.py\n\nDependencies\n------------\n\nThere are no hard dependencies for this pacakage.\n\n- if you want colourised output, you need to install the `colorama` package\n- if you need coverage reports, you need to install the `coverage` package\n\nUsage\n-----\n\nCollecting tests\n''''''''''''''''\n\nTo collect tests programatically, we provide the `filter_tests` helper function:\n\n.. code-block:: python\n\n # Collect all tests from the 'tests' directory\n test_suite = filter_tests('tests')\n\n # Filter an existing TestSuite\n test_suite = filter_tests(existing_suite, selector=['test_module', 'test_module2.TestCase'])\n\n # Filter tests from 'tests' directory\n test_suite = filter_tests('tests', selector=['test_module', 'test_module2.TestCase'])\n\nMeasuring coverage data\n'''''''''''''''''''''''\n\nTo measure coverage data, you have to pass the files to be included in the coverage report. If\nyou want to collect all your source files automatically, you can use the `collect_sources` helper\nfunction.\n\n.. code-block:: python\n\n source_files = collect_sources('.')\n\nRunning the tests\n'''''''''''''''''\n\nTo run a test suite with `GT2Runner`, you can use the following example:\n\n.. code-block:: python\n\n # Collect tests\n tests = filter_tests('tests')\n\n # Initialise the runner\n runner = GT2Runner(verbosity=1,\n failfast=False,\n rerun_log='rerun-log.txt',\n coverage_sources=collect_sources('.'))\n\n # Run the tests\n result = runner.run(tests)\n\n # Report coverage data\n result.coverage_report(save_data=True, html_dir='htmlcov', to_stream=True)\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gt2-io/GT2-io/gt2-test-runner", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gt2-test-runner", "package_url": "https://pypi.org/project/gt2-test-runner/", "platform": "", "project_url": "https://pypi.org/project/gt2-test-runner/", "project_urls": { "Homepage": "https://github.com/gt2-io/GT2-io/gt2-test-runner" }, "release_url": "https://pypi.org/project/gt2-test-runner/1.0/", "requires_dist": null, "requires_python": "", "summary": "unittest test runner with colourised output and per-test coverage support", "version": "1.0" }, "last_serial": 3105757, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "64699189984deb6f20f33c9df2ca1d7c", "sha256": "067c6b7a3d4b973864dd5fef6589713196e0d40c741605db9a8dcb5617e41711" }, "downloads": -1, "filename": "gt2-test-runner-1.0.tar.gz", "has_sig": false, "md5_digest": "64699189984deb6f20f33c9df2ca1d7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8066, "upload_time": "2017-08-18T08:30:20", "url": "https://files.pythonhosted.org/packages/fd/75/519067888e6b01a65546c16745bdb9fe6d26c88f8966e9dbd50096e410ba/gt2-test-runner-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "64699189984deb6f20f33c9df2ca1d7c", "sha256": "067c6b7a3d4b973864dd5fef6589713196e0d40c741605db9a8dcb5617e41711" }, "downloads": -1, "filename": "gt2-test-runner-1.0.tar.gz", "has_sig": false, "md5_digest": "64699189984deb6f20f33c9df2ca1d7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8066, "upload_time": "2017-08-18T08:30:20", "url": "https://files.pythonhosted.org/packages/fd/75/519067888e6b01a65546c16745bdb9fe6d26c88f8966e9dbd50096e410ba/gt2-test-runner-1.0.tar.gz" } ] }