diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-11-13 17:27:34 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-11-13 17:27:34 +0900 |
commit | 5ef5b9bb7e109b17371ec4d1bcd38985f209ee16 (patch) | |
tree | 90cd9c32e25df715f4ab222850e9bbd022beafa5 /tests/plugins | |
parent | 00ec60175328eff50f03c9e8c9dfcc2d6a76309f (diff) | |
download | buildstream-5ef5b9bb7e109b17371ec4d1bcd38985f209ee16.tar.gz |
Use pytest, add first basic plugin test
Diffstat (limited to 'tests/plugins')
-rw-r--r-- | tests/plugins/basics.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/plugins/basics.py b/tests/plugins/basics.py new file mode 100644 index 000000000..9e65ba14c --- /dev/null +++ b/tests/plugins/basics.py @@ -0,0 +1,21 @@ +import pytest + +from pluginbase import PluginBase +from buildstream._elementfactory import _ElementFactory +from buildstream._sourcefactory import _SourceFactory + +@pytest.fixture() +def plugin_base(): + base = PluginBase(package='buildstream.plugins') + return base + +def test_fixture(plugin_base): + assert(isinstance (plugin_base, PluginBase)) + +def test_source_factory(plugin_base): + source_factory = _SourceFactory(plugin_base) + assert(isinstance (source_factory, _SourceFactory)) + +def test_element_factory(plugin_base): + element_factory = _ElementFactory(plugin_base) + assert(isinstance (element_factory, _ElementFactory)) |