Skip to main content

python-unittest-cogent

A custom tests runner which gives output in three different formats (xml, json and html).

Quickstart

Installation:

pip install python-unittest-cogent

Usage: In example.py

import cogent
from cogent.tests import TestCase

class TestClassOne(TestCase):
    def test1(self):
        expected_number = 90
        actual_number = 90
        print('Test output foe test case 1')
        self.assertEqual(expected_number, actual_number)

if __name__ == "__main__":
    cogent.main()

To change the settings:

You can change the different-different settings like -

PROJECT_NAME = "Test Report"
APPLICATION_NAME = "Test APP"
APP_VERSION = "App Version 5.3"
PLATFORM = "Linux/Ubuntu 14.04"

HTML_TEST_REPORT_FILENAME = "Report.html"
XML_TEST_REPORT_FILENAME = "Report.xml"
JSON_TEST_REPORT_FILENAME = "Report.json"

DEFAULT_CONVERTER = "HTML" 

In example.py

import cogent
from cogent.tests import TestCase
from cogent import settings

settings.DEFAULT_CONVERTER = "XML"

class TestClassOne(TestCase):
    def test1(self):
        expected_number = 90
        actual_number = 90
        print('Test output foe test case 1')
        self.assertEqual(expected_number, actual_number)

if __name__ == "__main__":
    cogent.main.settings = settings
    cogent.main()

In case any queries you can contact me on my email - harshittrivedi78@gmail.com

Metadata

Release files for python-unittest-cogent 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-unittest-cogent 1.0.1
File Size Uploaded Provenance Actions
python-unittest-cogent-1.0.1.tar.gz 2.1 kB Without provenance Details for python-unittest-cogent-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-unittest-cogent 1.0.1
File Interpreter ABI Platform Actions
python_unittest_cogent-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for python_unittest_cogent-1.0.1-py2.py3-none-any.whl

Total release size: 4.7 kB

Release files / python-unittest-cogent-1.0.1.tar.gz

Download URL python-unittest-cogent-1.0.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c1083ddda4349d3134bd39a2361faae8e362f38e5b66ae870b3cbf88dd20d65d
BLAKE2b-256 checksum
How to use checksums
6cee0b22fb4876fb3c6d8da9511569321e616cf37c159ad7d5c33116fef98e5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

Release files / python_unittest_cogent-1.0.1-py2.py3-none-any.whl

Download URL python_unittest_cogent-1.0.1-py2.py3-none-any.whl
Size 2.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
03b5b9c80098ecf4a28746686e58e0d47546b3ad6eb65a80ae8c8820ff3353d1
BLAKE2b-256 checksum
How to use checksums
ed95dc3bddcfd7165c537fdc6d53ff1b6144c7925d32ee5ad497ba9559ddd094
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

Security for python-unittest-cogent 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page