Fix the test_uniqueName test failure
This commit is contained in:
parent
50cb212ad3
commit
76cbe6442c
2 changed files with 33 additions and 3 deletions
25
Uranium-issue265.patch
Normal file
25
Uranium-issue265.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From e122aae1a2dfa510c6708db99998756bbdddeced Mon Sep 17 00:00:00 2001
|
||||
From: Jaime van Kessel <nallath@gmail.com>
|
||||
Date: Wed, 28 Jun 2017 16:43:28 +0200
|
||||
Subject: [PATCH] Fixed the incorrect number removal check for unique name
|
||||
|
||||
---
|
||||
UM/Settings/ContainerRegistry.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/UM/Settings/ContainerRegistry.py b/UM/Settings/ContainerRegistry.py
|
||||
index dc4a25bcc..084ec04ae 100644
|
||||
--- a/UM/Settings/ContainerRegistry.py
|
||||
+++ b/UM/Settings/ContainerRegistry.py
|
||||
@@ -351,8 +351,9 @@ def uniqueName(self, original: str) -> str:
|
||||
|
||||
if not name: #Wait, that deleted everything!
|
||||
name = "Profile"
|
||||
- elif not self.findContainers(id = name, ignore_case = True) and not self.findContainers(name = name):
|
||||
- return name
|
||||
+ elif not self.findContainers(id = original.strip(), ignore_case = True) and not self.findContainers(name = original.strip()):
|
||||
+ # Check if the stripped version of the name is unique (note that this can still have the number in it)
|
||||
+ return original.strip()
|
||||
|
||||
unique_name = name
|
||||
i = 1
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
Name: python-uranium
|
||||
Version: 2.6.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A Python framework for building desktop applications
|
||||
License: AGPLv3+
|
||||
URL: https://github.com/Ultimaker/Uranium
|
||||
Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz
|
||||
|
||||
# https://github.com/Ultimaker/Uranium/issues/265
|
||||
Patch0: Uranium-issue265.patch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: /usr/bin/doxygen
|
||||
BuildRequires: /usr/bin/msgmerge
|
||||
|
|
@ -76,9 +79,8 @@ pip3 freeze
|
|||
|
||||
# The failing tests are reported at:
|
||||
# https://github.com/Ultimaker/Uranium/issues/225
|
||||
# https://github.com/Ultimaker/Uranium/issues/265
|
||||
# Skipping
|
||||
%{__python3} -m pytest -v -k "not getMimeTypeForFile and not test_uniqueName"
|
||||
%{__python3} -m pytest -v -k "not getMimeTypeForFile"
|
||||
|
||||
|
||||
%install
|
||||
|
|
@ -114,6 +116,9 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-2
|
||||
- Fix the test_uniqueName test failure
|
||||
|
||||
* Wed Jun 28 2017 Miro Hrončok <mhroncok@redhat.com> - 2.6.1-1
|
||||
- Update to 2.6.1
|
||||
- Skip test_uniqueName test (reported)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue