Fix PluginRegistry test

This commit is contained in:
Miro Hrončok 2018-05-28 10:16:23 +02:00
commit b0d71399a2
2 changed files with 35 additions and 3 deletions

View file

@ -0,0 +1,27 @@
From 72e584d799450e7ede0667a8e875526bce21e5fd Mon Sep 17 00:00:00 2001
From: Diego Prado Gesto <d.pradogesto@ultimaker.com>
Date: Wed, 16 May 2018 16:50:36 +0200
Subject: [PATCH] CURA-5164 Fix PluginRegistry test (subset)
---
tests/PluginRegistry/TestPluginRegistry.py | 10 +++++++---
tests/Settings/conftest.py | 7 ++++---
tests/VersionUpgrade/TestVersionUpgradeManager.py | 1 -
tests/conftest.py | 7 +++----
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/tests/PluginRegistry/TestPluginRegistry.py b/tests/PluginRegistry/TestPluginRegistry.py
index 0f8456e7c..43a8354e1 100644
--- a/tests/PluginRegistry/TestPluginRegistry.py
+++ b/tests/PluginRegistry/TestPluginRegistry.py
@@ -68,7 +72,7 @@ def test_disabledPlugin(self, registry):
def test_emptyPlugin(self, registry):
registry.loadPlugin("EmptyPlugin")
- with pytest.raises(KeyError):
+ with pytest.raises(PluginNotFoundError):
registry.getPluginObject("EmptyPlugin")
def test_invalidVersionNumber(self, registry):

View file

@ -1,11 +1,14 @@
Name: python-uranium
Version: 3.3.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A Python framework for building desktop applications
License: LGPLv3+
URL: https://github.com/Ultimaker/Uranium
Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
# https://github.com/Ultimaker/Uranium/issues/345
Patch0: fix-PluginRegistry-test.patch
BuildRequires: python3-devel
BuildRequires: /usr/bin/doxygen
BuildRequires: /usr/bin/msgmerge
@ -66,8 +69,7 @@ make doc
%check
pip3 freeze
# https://github.com/Ultimaker/Uranium/issues/345
%{__python3} -m pytest -v -k "not test_emptyPlugin"
%{__python3} -m pytest -v
%install
@ -103,6 +105,9 @@ popd
%changelog
* Mon May 28 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-2
- Fix PluginRegistry test
* Wed May 02 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.0-1
- Update to 3.3.0 (#1571792)
- Skip test_emptyPlugin