PyUtilib / pyutilib

A collection of general Python utilities, including logging and file IO, subprocess management, plugin systems, and workflow management.
BSD 3-Clause "New" or "Revised" License
34 stars 21 forks source link

Disable nose's use of docstrings for test descriptions #54

Closed jsiirola closed 5 years ago

jsiirola commented 5 years ago

Summary/Motivation:

By default, nose will use and output the first line of a test's docstring when running tests instead of the more informative (and useful) module path and test function name. Instead of going through all of Pyomo / PyUtilib and removing the use of docstrings, this change prevents nose from interrogating the docstring in the first place.

The net effect is that output from running nosetests -v will change output like:

Use a solver manager that delays the evaluation of responses, and verify that queue-ing multiple solves works. ... ok
Use a solver manager that delays the evaluation of responses, and verify that queue-ing multiple solves works. ... ok
Use a solver manager that delays the evaluation of responses, and verify that queue-ing multiple solves works. ... ok
Test Serial EvalManager - TestProblem1 ... ok
Test Serial SolverManager - Error with no optimizer ... ok
Test Serial SolverManager - Error with no queue solves ... ok

to

test_avail (pyomo.opt.tests.base.test_solver.OptSolverDebug) ... ok
test_problem_format (pyomo.opt.tests.base.test_solver.OptSolverDebug) ... ok
test_results_format (pyomo.opt.tests.base.test_solver.OptSolverDebug) ... ok
test_set_problem_format (pyomo.opt.tests.base.test_solver.OptSolverDebug) ... ok
test_set_results_format (pyomo.opt.tests.base.test_solver.OptSolverDebug) ... ok

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.03%) to 62.288% when pulling 038ca1794b4a22363232442d5410eef79e4afc16 on standardize-test-names into 9ba3214dafd216ce419b81490ea824ed51237924 on master.

whart222 commented 5 years ago

This is a nice change.