aboutsummaryrefslogtreecommitdiffstats
path: root/tests/plugin_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Raise a TypeError if add_copy_specs() is called with a stringBryn M. Reeves2014-03-271-0/+3
| | | | | | | | | | Since strings are iterable a plugin attempting to call add_copy_specs("/something") results in a plugin calling add_copy_spec("/"). Raise a TypeError if this happens. Fixes Issue #141. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Add tests for Plugin.add_copy_spec()/add_copy_specs()Bryn M. Reeves2014-03-271-2/+24
| | | | | | Give add_copy_spec() and add_copy_specs() their own test cases. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Update Plugin tests to treat copy_paths as a setBryn M. Reeves2014-03-271-1/+1
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove references to 'sub' parameter from plugin testsBryn M. Reeves2014-03-271-7/+3
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Update plugin_tests.py to match new method namesBryn M. Reeves2014-03-271-5/+5
| | | | Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Add vim tags to all python source filesBryn M. Reeves2014-03-261-0/+2
| | | | | | Fixes Issue #243. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Dead code removal: sos_relative_path()Bryn M. Reeves2014-03-261-16/+1
| | | | | | | The function is defined and even has test cases. But no callers.. Remove the function and the test cases that exercise it. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Remove --profile supportBryn M. Reeves2014-03-251-3/+1
| | | | | | | | | | | | | The handrolled profile logging support in sos hasn't been widely used in a long time and is a problem better solved with external profiling and coverage tools. Rip out all the support and documentation. This shortens and simplifies numerous Plugin class methods. Fixes Issue #244. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Fix plugin_test exception on six.PY2Bryn M. Reeves2014-03-251-2/+2
| | | | | | | Replace explicit test for six.PY2 with try/exception handling of StringIO import. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Python 3 portAdam Stokes2013-10-301-2/+8
| | | | | | | | | | | | This includes a necessary dependency on python-six for its compability layer since we are wanting to continue support for both Python 2.7.x and Python 3.x. In addition, this will allow us to effectively phase out Python 2 support when/if the time arises that all interested distributions have done away with Python 2. This port passes all unittests for both python 2.7.x and python 3.3.x Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Fix unittests and more pep8 conformingAdam Stokes2013-04-041-14/+12
| | | | | | | | | | | | | | | | - In our unittest we defined 'is_installed' to be a bool when in fact we wanted to verify if a package is installed via the _method_ is is_installed. Since overriding that method with our variable definition we basically removed any functionality of 'is_installed' method in Plugin class. - Initializing a fake plugin to test was failing due to our global logger not being initialized. Put a simple check in the library to make sure the logger is defined no matter what the calling state does. - Make import selinux conditional - Add travis-ci support - Rename README to utilize travis-ci build status and other markdown supported features Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
* Make more names pep8 compliant across the treeBryn M. Reeves2013-03-281-5/+5
| | | | | | | | | Fix policy and utility function, method and variable names to use lower case underscored style instead of camelCase. Related to Issue #112. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Rename copy_stuff() to collect()Bryn M. Reeves2013-03-281-2/+2
| | | | | | | | The name copy_stuff() isn't as descriptive now that the data may be being streamed into an archive without being copied into a temporary directory. Calling it collect covers both equally well. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Rename functions and methods in plugins to comply with pep8Bryn M. Reeves2013-03-281-30/+30
| | | | | | | | | | | | | There are lots of historical camelCase function and method names in the plugin directory even though pep8 very clearly recommends against these other than for external backwards compatibility. Rename all the camelCased functions and methods and fix up the main sosreport code, examples and tests to use the new names. Fixes Issue #112. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
* Rename regex substitution functionsBryn M. Reeves2012-12-051-3/+3
| | | | | Rename doRegexSub and doRegexExtOutputSub to doFileSub and doExtOutputSub respectively.
* fixing some python2.5 compatibility issuesJesse Jaggars2012-03-141-1/+9
|
* Squashed commit of the following:Jesse Jaggars2012-03-131-0/+311
commit 1c2cf82a424125decda210a557755e8467bf0b2b Author: Jesse Jaggars <jjaggars@redhat.com> Date: Tue Mar 13 15:20:47 2012 -0500 adding regex sub tests and some docstrings commit d72f2f28b364519710f95a53330821138fc40849 Author: Jesse Jaggars <jjaggars@redhat.com> Date: Tue Mar 13 11:13:06 2012 -0500 adding many tests for plugins