diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-02-28 19:31:03 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-01 19:05:30 +0000 |
commit | d6d33c94751bd47ca77d2b2e4ac246a2dd1328a6 (patch) | |
tree | 1739ba821e90215f89901bed10326f4142360f21 /tests/internals/pluginfactory.py | |
parent | 8f9b3dcdaca6f5179b79328b17b3e2c71db19e73 (diff) | |
download | buildstream-d6d33c94751bd47ca77d2b2e4ac246a2dd1328a6.tar.gz |
tests: Remove unused variables
Diffstat (limited to 'tests/internals/pluginfactory.py')
-rw-r--r-- | tests/internals/pluginfactory.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/internals/pluginfactory.py b/tests/internals/pluginfactory.py index 28ab039bd..ec4516736 100644 --- a/tests/internals/pluginfactory.py +++ b/tests/internals/pluginfactory.py @@ -79,8 +79,8 @@ def test_missing_source(plugin_fixture): assert(isinstance(factory, SourceFactory)) # Test fails if PluginError is not raised - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') def test_missing_element(plugin_fixture): @@ -88,8 +88,8 @@ def test_missing_element(plugin_fixture): assert(isinstance(factory, ElementFactory)) # Test fails if PluginError is not raised - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin that returns a value instead of Source subclass @@ -102,8 +102,8 @@ def test_source_notatype(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = SourceFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin that returns a value instead of Element subclass @@ -116,8 +116,8 @@ def test_element_notatype(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = ElementFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin that returns a type @@ -131,8 +131,8 @@ def test_source_wrongtype(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = SourceFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin that returns a type @@ -146,8 +146,8 @@ def test_element_wrongtype(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = ElementFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin which fails to provide a setup() function @@ -160,8 +160,8 @@ def test_source_missing_setup(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = SourceFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin which fails to provide a setup() function @@ -174,8 +174,8 @@ def test_element_missing_setup(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = ElementFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin which provides a setup symbol @@ -189,8 +189,8 @@ def test_source_bad_setup(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = SourceFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin which provides a setup symbol @@ -204,8 +204,8 @@ def test_element_bad_setup(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = ElementFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin which requires an absurdly @@ -219,8 +219,8 @@ def test_source_badversion(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = SourceFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') # Load a factory with a plugin which requires an absurdly @@ -234,8 +234,8 @@ def test_element_badversion(plugin_fixture, datafiles): 'plugins': {'foo': 0} }] factory = ElementFactory(plugin_fixture['base'], plugin_origins=plugins) - with pytest.raises(PluginError) as exc: - foo_type = factory.lookup('foo') + with pytest.raises(PluginError): + factory.lookup('foo') ############################################################## |