Modify ↓
Opened 11 years ago
Last modified 11 years ago
#11778 new enhancement
How do you invoke tests?
| Reported by: | Chris Nelson | Owned by: | Joachim Hoessler |
|---|---|---|---|
| Priority: | normal | Component: | EstimationToolsPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
I want to be sure some changes I've made haven't broken anything (and, perhaps, add tests for those changes/additions) but I can't figure out how to invoke the tests.
~/src/trac/plugins/estimationtoolsplugin/estimationtools$ ls
burndownchart.py htdocs tests
hoursinplaceeditor.py __init__.py utils.py
hoursremaining.py templates workloadchart.py
~/src/trac/plugins/estimationtoolsplugin/estimationtools$ sudo python tests/burndownchart.py
Traceback (most recent call last):
File "tests/burndownchart.py", line 3, in <module>
from estimationtools.burndownchart import BurndownChart
ImportError: No module named estimationtools.burndownchart
~/src/trac/plugins/estimationtoolsplugin/estimationtools$ cd tests/
~/src/trac/plugins/estimationtoolsplugin/estimationtools/tests$ sudo python burndownchart.py
Traceback (most recent call last):
File "burndownchart.py", line 3, in <module>
from estimationtools.burndownchart import BurndownChart
ImportError: No module named estimationtools.burndownchart
Attachments (0)
Change History (2)
Note: See
TracTickets for help on using
tickets.



From the root directory you can execute
python setup.py test:There are other ways to execute unit tests, but some code needs to be added.