/unit_testing

Basic implementation of unit testing with python

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Python Unit Testing Example

Build Status Coverage Status license

A basic implementation of a Linked List with basic list implementation such as:

  • Insertion
  • Deletion
  • Checking existence of an element
  • Checking emptiness of the list
  • Get the length of the linked list

Installation

To run the tests first create the virtual environment

python3 -m venv venv

Activate the virtual environment

source venv/bin/activate

Finally install the requirements in order to perform the tests with nosetests and coverage

pip install -r requirements.txt

Testing

nosetests test_linked_list.py

With coverage

nosetests --with-coverage --cover-package app test_linked_list.py