Coder Social home page Coder Social logo

microtest's Introduction

microtest

Simple but powerful testing framework for Python.


Installation

python -m pip install microtest-framework

On Mac and Linux microtest doesn't require any external dependencies. On Windows colorama is used to translate ANSI escape sequences to win32 calls.

Microtest currently requires Python version 3.7 or higher.


Usage

Here's the simplest testing program you can create with microtest:

import microtest


@microtest.test
def function():
    x = 10
    assert x < 0
    

if __name__ == '__main__':
    microtest.run()

You can run this script normally via the command line:

python test.py

The script will produce the following output:

======================================================================
Started testing...
======================================================================
function ..................................................... FAILED

AssertionError on line 7:
assert 10 < 0 


----------------------------------------------------------------------
Ran 1 tests in 0.001s.

ERRORS: 0
FAILED: 1

Documentation

Full source code refrence and user guide can be found here.


Contributing

To contribute new features to this project do the following steps:

  • Open a new issue explaining the new feature
  • Wait for approval
  • Fork and clone the repository to your local machine and code up the feature in a new branch
  • Pull request

The wait for approval step is there so that you don't end up coding up some feature that might not be included into microtest. This could happen if the proposed feature is redundant, changes the existing api too radically, or simply just is not the right thing to be added into microtest.

The goal is to keep this project simple and small.

Bug fixes, documentation improvements and other minor tweaks are always welcome, no need for approval. Just leave a pull request with the fixes done in a separate branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.