Refactor and add tests for plugins.py

Improvement to the tests currently being run on ``plugins.py``

related #644 
Empty sequences are false in Python, so the pythonic way to check for a non-empty sequence is `if seq` (this is mentioned in PEP 8). So in this case you should write `assert plugins`.

The comment can be made into a failure message, e.g. `assert plugins, "List of plugins should not be empty"`