Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 1.1 KB

testing.rst

File metadata and controls

48 lines (28 loc) · 1.1 KB
.. currentmodule:: prody

Testing ProDy

The easiest way to run ProDy unit tests is using nose_. The following will run all tests:

$ nosetests prody

To skip tests that are slow, use the following:

$ nosetests prody -a '!slow'

To run tests for a specific module do as follows:

$ nosetests prody.tests.atomic prody.tests.sequence

Unit test development should follow these guidelines:

  1. For comparing Python numerical types and objects, e.g. int, list, tuple, use methods of :class:`unittest.TestCase`.
  2. For comparing Numpy arrays, use assertions available in :mod:`numpy.testing` module.
  3. All test files should be stored in :file:`tests` folder in the ProDy package directory, i.e. :file:`prody/tests/`
  4. All tests for functions and classes in a ProDy module should be in a single test file named after the module, e.g. :file:`test_atomic/test_select.py`.
  5. Data files for testing should be located in :file:`tests/test_datafiles`.