testing: rename test_directive to stub_directive
ClosedPublic

Authored by kparal on Apr 21 2015, 3:00 PM.

Details

Summary

py.test was picking up the name (and TestDirective class inside) and was
emitting warnings about incorrectly set up test class. Rename it to make
it clear we don't actually want to run it, just use as a stub in a
different test.

Before:

$ py.test -F -r w testing/
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.8 -- py-1.4.26 -- pytest-2.6.4
plugins: cov
collected 272 items 

testing/functest_config.py .....
testing/functest_file_utils.py ............
testing/functest_koji_utils.py ...
testing/functest_logger.py ...
testing/functest_mash_directive.py .....
testing/functest_python_directive.py ...
testing/functest_runner.py .
testing/functest_yumrepoinfo.py ..
testing/functest_yumrepoinfo_directive.py ............
testing/test_arch_utils.py ....
testing/test_bodhi_comment_directive.py ..............
testing/test_bodhi_directive.py ........
testing/test_bodhi_utils.py ..........
testing/test_buildbot_utils.py ......
testing/test_check.py .............................
testing/test_config.py ...........
testing/test_directive_modules.py ...
testing/test_koji_directive.py .......
testing/test_koji_utils.py ...................
testing/test_logger.py .....
testing/test_python_directive.py .............
testing/test_python_utils.py ......
testing/test_resultsdb_directive.py ...........
testing/test_rpm_utils.py ...........
testing/test_runner.py .................................
testing/test_taskformula.py ......................
testing/test_yumrepoinfo.py ..............

================================================================== warning summary ===================================================================
WC1 /home/kparal/devel/taskotron/libtaskotron/testing/test_directives/test_directive.py cannot collect test class 'TestDirective' because it has a __init__ constructor
======================================================= 272 passed, 1 warnings in 4.78 seconds =======================================================

After:

$ py.test -F -r w testing/
================================================================ test session starts =================================================================
platform linux2 -- Python 2.7.8 -- py-1.4.26 -- pytest-2.6.4
plugins: cov
collected 272 items 

testing/functest_config.py .....
testing/functest_file_utils.py ............
testing/functest_koji_utils.py ...
testing/functest_logger.py ...
testing/functest_mash_directive.py .....
testing/functest_python_directive.py ...
testing/functest_runner.py .
testing/functest_yumrepoinfo.py ..
testing/functest_yumrepoinfo_directive.py ............
testing/test_arch_utils.py ....
testing/test_bodhi_comment_directive.py ..............
testing/test_bodhi_directive.py ........
testing/test_bodhi_utils.py ..........
testing/test_buildbot_utils.py ......
testing/test_check.py .............................
testing/test_config.py ...........
testing/test_directive_modules.py ...
testing/test_koji_directive.py .......
testing/test_koji_utils.py ...................
testing/test_logger.py .....
testing/test_python_directive.py .............
testing/test_python_utils.py ......
testing/test_resultsdb_directive.py ...........
testing/test_rpm_utils.py ...........
testing/test_runner.py .................................
testing/test_taskformula.py ......................
testing/test_yumrepoinfo.py ..............

============================================================= 272 passed in 4.82 seconds =============================================================
Test Plan

it works!

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal retitled this revision from to testing: rename test_directive to stub_directive.Apr 21 2015, 3:00 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added reviewers: mkrizek, jskladan, tflink.
tflink accepted this revision.Apr 21 2015, 3:13 PM

sounds good to me

This revision is now accepted and ready to land.Apr 21 2015, 3:13 PM
This revision was automatically updated to reflect the committed changes.