From 07aa4789fc4343b4564ca2942f605f0f484b1f62 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Apr 28 2016 03:34:08 +0000 Subject: Remove non-portable test (#1285641) --- diff --git a/python-smmap.spec b/python-smmap.spec index 8cd2cd4..07a94f4 100644 --- a/python-smmap.spec +++ b/python-smmap.spec @@ -11,13 +11,15 @@ Name: python-smmap Version: 0.9.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Sliding window memory map manager License: BSD URL: https://github.com/Byron/smmap # Download from https://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz#md5=d7932d5ace206bf4ae15198cf36fb6ab Source0: http://pypi.python.org/packages/source/s/smmap/smmap-0.9.0.tar.gz +# https://bugzilla.redhat.com/show_bug.cgi?id=1285641 +Patch0: smmap-0.9.0-fix-tests-remove-line-failing.patch BuildArch: noarch BuildRequires: python-devel, python-setuptools, python-nose @@ -35,6 +37,9 @@ BuildRequires: python3-devel, python3-setuptools, python3-nose %prep %setup -qc -n smmap-%{version} +pushd smmap-%{version} +%patch0 -p1 +popd mv smmap-%{version} python2 %if 0%{?with_python3} @@ -88,6 +93,9 @@ popd %endif # with_python3 %changelog +* Thu Apr 28 2016 Yaakov Selkowitz - 0.9.0-5 +- Remove non-portable test (#1285641) + * Thu Feb 04 2016 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/smmap-0.9.0-fix-tests-remove-line-failing.patch b/smmap-0.9.0-fix-tests-remove-line-failing.patch new file mode 100644 index 0000000..93ccae0 --- /dev/null +++ b/smmap-0.9.0-fix-tests-remove-line-failing.patch @@ -0,0 +1,50 @@ +From 18e4aea23644ea43657cb2e6846b6aaf78720c27 Mon Sep 17 00:00:00 2001 +From: Sebastian Thiel +Date: Fri, 8 May 2015 08:56:47 +0200 +Subject: [PATCH] fix(tests): remove line failing on power-pc + +It's worth noting that I never reproduced the issue, nor have I seen +a stack-trace. Thus the line is removed in good-faith, but should also +not pose any problem considering it was very specific and only in a +test-case. + +The main problem is that I don't understand anymore why that assertion +should be true, and thus can't judge the correctness of this fix at all. + +Closes #25 +--- + smmap/test/test_util.py | 8 -------- + smmap/util.py | 1 - + 2 files changed, 9 deletions(-) + +diff --git a/smmap/test/test_util.py b/smmap/test/test_util.py +index 0a16260..5a9d7bd 100644 +--- a/smmap/test/test_util.py ++++ b/smmap/test/test_util.py +@@ -76,14 +76,6 @@ def test_region(self): + + assert rfull.includes_ofs(0) and rfull.includes_ofs(fc.size - 1) and rfull.includes_ofs(half_size) + assert not rfull.includes_ofs(-1) and not rfull.includes_ofs(sys.maxsize) +- # with the values we have, this test only works on windows where an alignment +- # size of 4096 is assumed. +- # We only test on linux as it is inconsitent between the python versions +- # as they use different mapping techniques to circumvent the missing offset +- # argument of mmap. +- if sys.platform != 'win32': +- assert rhalfofs.includes_ofs(rofs) and not rhalfofs.includes_ofs(0) +- # END handle platforms + + # auto-refcount + assert rfull.client_count() == 1 +diff --git a/smmap/util.py b/smmap/util.py +index 1d20e50..36ff1ab 100644 +--- a/smmap/util.py ++++ b/smmap/util.py +@@ -1,7 +1,6 @@ + """Module containing a memory memory manager which provides a sliding window on a number of memory mapped files""" + import os + import sys +-import mmap + + from mmap import mmap, ACCESS_READ + try: