iut
iutest
pypi i iutest
iut

iutest

An interactive python test runner supports various test frameworks.

by Miguel Gao

0.1.5 (see all)License:MIT
pypi i iutest
Readme

Build Coverage Status Quality Gate Status

PyPi License Download PythonVersion

logo IUTest

"IUTest" stands for "Interactive UnitTest", it is an interactive python unit-test runner that aims to support various unit-test frameworks like nose2, pytest, etc.

It has a pretty yummy Chinese name "Youtiao", which is Chinese fried breadstick typically for breakfast :)

Demo

To install IUTest

# For system default python or virtual env
pip install iutest

# For pipenv python
pipenv install iutest

IUTest Command Line Interface

# Get version:
iutest --version

# Run IUTest UI:
iutest
# or
iutest --ui

# Run all tests recursively within a directory:
iutest --runner "nose2" --runTests "E:/projects/iutest"

# Run tests by python module paths:
iutest --runner "nose2" --runTests "iutest.tests.test_dummypyunits" --runTests "iutest.tests.iutests"

# Run test but stop at first error / failure:
iutest --runner "nose2" --runTests "iutest" --stopOnError

Run tests in python

import sys
testerPath = 'E:/projects/iutest'  # Change to your path!
if testerPath not in sys.path:
    sys.path.append(testerPath)

import iutest
# Run all tests under given file system path:
iutest.runTests("nose2", 'path/To/Test/RootDir')

# Run tests by given python module paths:
iutest.runTests("nose2", "iutest.tests.test_dummytests", "iutest.tests.iutests")

Run UI in python

import sys
testerPath = 'E:/projects/iutest'  # Change to your path!
if testerPath not in sys.path:
    sys.path.append(testerPath)

import iutest
iutest.runUi()

Run IUTest in DCC application, e.g. Maya

It is easy to use pip with Maya, with pip available in mayapy, you just need to do mayapy -m pip install packageName for each package we need: iutest, reimport, nose2 or pytest.

However, pip requires root privilege and it did introduce many potential risks, so to use iutest in Maya without pip:

  • Download IUTest and its dependency libraries: reimport, nose2 or pytest
  • Make these libraries available to Maya by adding their paths to sys.path.
  • Install the code above as a Maya shelf button.
  • Click on the shelf button to run IUTest UI.

GitHub Stars

9

LAST COMMIT

2yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

3

OPEN PRs

1
VersionTagPublished
0.1.5
2yrs ago
0.1.4
2yrs ago
0.1.3
2yrs ago
0.1.2
2yrs ago
No alternatives found
No tutorials found
Add a tutorial