Update to 3.5.1 (#1644323)

This commit is contained in:
Miro Hrončok 2018-11-12 10:57:42 +01:00
commit 517d0a181d
4 changed files with 9 additions and 121 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
/Uranium-3.2.1.tar.gz
/Uranium-3.3.0.tar.gz
/Uranium-3.4.1.tar.gz
/Uranium-3.5.1.tar.gz

View file

@ -1,117 +0,0 @@
From b1f054ffbf85eaa403e2158c2d7548bcc5491e73 Mon Sep 17 00:00:00 2001
From: Lipu Fei <lipu.fei815@gmail.com>
Date: Wed, 11 Jul 2018 12:20:57 +0200
Subject: [PATCH] Fix unit tests
---
.../ContainerTestPlugin.py | 8 +++++++-
tests/Settings/TestContainerRegistry.py | 14 +++++++++-----
tests/Settings/TestContainerStack.py | 19 +++++++++----------
3 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py b/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py
index 71e5561..5afb021 100644
--- a/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py
+++ b/tests/Settings/ContainerTestPlugin/ContainerTestPlugin.py
@@ -1,7 +1,7 @@
# Copyright (c) 2017 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
-from typing import Optional
+from typing import Any, Optional
import uuid
from UM.PluginObject import PluginObject
@@ -63,6 +63,9 @@ class ContainerTestPlugin(ContainerInterface, PluginObject):
def isReadOnly(self):
return False
+ def getAllKeys(self):
+ pass
+
## Get the value of a property of a container item.
#
# Since this test container cannot contain any items, it always returns
@@ -72,6 +75,9 @@ class ContainerTestPlugin(ContainerInterface, PluginObject):
def getProperty(self, key, property_name, context = None):
pass
+ def setProperty(self, key: str, property_name: str, property_value: Any, container: "ContainerInterface" = None, set_from_cache: bool = False) -> None:
+ pass
+
def hasProperty(self, key, property_name):
pass
diff --git a/tests/Settings/TestContainerRegistry.py b/tests/Settings/TestContainerRegistry.py
index bd3f666..1db4578 100644
--- a/tests/Settings/TestContainerRegistry.py
+++ b/tests/Settings/TestContainerRegistry.py
@@ -1,10 +1,11 @@
# Copyright (c) 2017 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
-import os.path
-import pytest
+import os
from typing import Optional
+import pytest
+
import UM.PluginObject
from UM.Resources import Resources
from UM.Settings.DefinitionContainer import DefinitionContainer
@@ -75,9 +76,12 @@ class MockContainer(ContainerInterface, UM.PluginObject.PluginObject):
def setPath(self, path):
pass
- ## Gets the value of a property of a container item.
- #
- # This method is not implemented in the mock container.
+ def getAllKeys(self):
+ pass
+
+ def setProperty(self, key, property_name, property_value, container = None, set_from_cache = False):
+ pass
+
def getProperty(self, key, property_name, context = None):
raise NotImplementedError()
diff --git a/tests/Settings/TestContainerStack.py b/tests/Settings/TestContainerStack.py
index a07b647..9bf918c 100644
--- a/tests/Settings/TestContainerStack.py
+++ b/tests/Settings/TestContainerStack.py
@@ -38,6 +38,9 @@ class MockContainer(ContainerInterface):
def getName(self):
return "Fred"
+ def getAllKeys(self):
+ pass
+
## Get whether the container item is stored on a read only location in the filesystem.
#
# \return Always returns False
@@ -52,9 +55,6 @@ class MockContainer(ContainerInterface):
def setPath(self, path):
pass
- ## Returns the metadata dictionary.
- #
- # \return A dictionary containing metadata for this container stack.
def getMetaData(self):
return self._metadata
@@ -69,11 +69,9 @@ class MockContainer(ContainerInterface):
return self._metadata["entry"]
return default
- ## Gets the value of a container item property.
- #
- # If the key doesn't exist, returns None.
- #
- # \param key The key of the item to get.
+ def setProperty(self, key, property_name, property_value, container = None, set_from_cache = False):
+ pass
+
def getProperty(self, key, property_name, context = None):
if key in self.items:
return self.items[key]

View file

@ -1,5 +1,5 @@
Name: python-uranium
Version: 3.4.1
Version: 3.5.1
Release: 1%{?dist}
Summary: A Python framework for building desktop applications
License: LGPLv3+
@ -17,6 +17,7 @@ BuildRequires: git-core
BuildRequires: python3-arcus == %{version}
BuildRequires: python3-numpy
BuildRequires: python3-scipy
BuildRequires: python3-shapely
BuildRequires: python3-qt5
BuildRequires: python3-pytest
@ -38,6 +39,7 @@ Provides: uranium = %{version}-%{release}
Requires: python3-arcus == %{version}
Requires: python3-numpy
Requires: python3-scipy
Requires: python3-shapely
Requires: python3-qt5
Recommends: python3-numpy-stl
@ -63,8 +65,7 @@ make doc
%check
%{__python3} -m pip freeze
# https://github.com/Ultimaker/Uranium/issues/394
%{__python3} -m pytest -v -k "not TestContainerStack and not TestContainerRegistry"
%{__python3} -m pytest -v
%install
@ -103,6 +104,9 @@ popd
%changelog
* Mon Nov 12 2018 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-1
- Update to 3.5.1 (#1644323)
* Tue Aug 28 2018 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-1
- Update to 3.4.1 (#1599724)

View file

@ -1 +1 @@
SHA512 (Uranium-3.4.1.tar.gz) = 59e0a605f3d898765bb670104cabb7fb1471061934900e63b54c1a07219970e07414a3983e96a577f5986302779b7acedc8e0ef0da3756dceefc0170ec80645b
SHA512 (Uranium-3.5.1.tar.gz) = 2924721f5308eb8f27826316a705a12f0768889a4a6c9de431d6827a98036b664497c12ef1dd42e47f67e566fe169d7b5941b62426952c9bec1797933bfc62ce