Skip to content

Commit 6917c59

Browse files
committed
Document changes to unit testing
1 parent 0e002df commit 6917c59

File tree

3 files changed

+25
-36
lines changed

3 files changed

+25
-36
lines changed

CHANGES.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ CHANGES
88

99
The dalton has been added as an alias for the unified atomic mass
1010
unit, in response to the 2005 IUPAP report recognizing that both
11-
terms should be officially recognized. Da is recognized as the
12-
symbol for the dalton.
11+
terms should be officially recognized. Da is recognized as the symbol
12+
for the dalton.
13+
14+
The test suite has been refactored to use the unittest package
15+
provided by the python-2.7 and python-3.2 standard library. With
16+
python-2.6 or python-3.{0,1}, unittest2 is required. The test suite
17+
is run with::
18+
19+
python setup.py test
20+
21+
Quantities no longer requires or uses Distribute or Setuptools.
22+
1323

1424
-----
1525
0.9.0

doc/devel/devnotes.rst

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
11
Development
22
===========
33

4-
In order to work on quantities development, after installing the dependencies,
5-
it is recommended to do the following::
4+
Quantities development uses the principles of test-driven development. New
5+
features or bug fixes need to be accompanied by unit tests based on Python's
6+
unittest package. Unit tests can be run with the following::
67

7-
python setup.py develop
8+
python setup.py test
89

9-
This uses setuptools to install a link in your site-packages directory which
10-
points to your source directory. This allows you to make changes in the source
11-
directory without having to reinstall quantities. Note, however, that after
12-
changing extension code, which needs to be compiled, you will need to run
13-
"python setup.py develop" again. Also note that executable scripts are copied
14-
to their install directory, rather than being linked, so you need to run
15-
"python setup.py develop" after editing scripts.
16-
17-
Unit tests are collected by the nose package, and can be run with the following::
18-
19-
python setup.py nosetests --with-coverage --cover-package=quantities \
20-
--cover-erase --cover-tests
21-
22-
This assumes you have both nose_ and coverage_ installed on your system.
23-
24-
.. _nose: http://somethingaboutorange.com/mrl/projects/nose
25-
.. _coverage: http://nedbatchelder.com/code/modules/rees-coverage.html
10+
This works with the version of unittest provided by the python-2.7 and
11+
python-3.2 standard library. If you are running python-2.6 or python-3.1, you
12+
need to install unittest2 to run the test suite.

doc/user/installation.rst

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@ Prerequisites
99
Quantities has a few dependencies:
1010

1111
* Python_ (>=2.6)
12-
* NumPy_ (>=1.3)
12+
* NumPy_ (>=1.4)
1313

14-
in order to run the test suite, you will need:
14+
If you want to run the test suite on python-2.6 or python-3.1, install the
15+
unittest2_ or unittest2py3k_ package, respectively.
1516

16-
* nose_
17-
18-
The following are also suggested for anyone contributing to
19-
quantities:
20-
21-
* distribute_ (>=0.6.10) or setuptools_ (=>0.6c11)
22-
* coverage_
2317

2418
Source Code Installation
2519
========================
@@ -32,17 +26,15 @@ Development
3226

3327
You can follow and contribute to Quantities' development using git::
3428

35-
git clone git@github.com:darrendale/python-quantities.git
29+
git clone git@github.com:python-quantities/python-quantities.git
3630

3731
Bugs, feature requests, and questions can be directed to the github_
3832
website.
3933

4034

4135
.. _Python: http://www.python.org/
42-
.. _distribute: http://pypi.python.org/pypi/distribute
43-
.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
4436
.. _NumPy: http://www.scipy.org
45-
.. _nose: http://somethingaboutorange.com/mrl/projects/nose
46-
.. _coverage: http://nedbatchelder.com/code/modules/rees-coverage.html
4737
.. _PyPi: http://pypi.python.org/pypi/quantities
38+
.. _unittest2: http://pypi.python.org/pypi/unittest2
39+
.. _unittest2py3k: http://pypi.python.org/pypi/unittest2py3k
4840
.. _github: http://github.com/python-quantities/python-quantities

0 commit comments

Comments
 (0)