From 01fc220525756a2a474c7291360854118ccded0c Mon Sep 17 00:00:00 2001 From: Carl George Date: Jun 25 2018 16:04:24 +0000 Subject: Add patch1 to mark test_pdir_class as an expected fail --- diff --git a/python-pdir2.spec b/python-pdir2.spec index 9507df1..1124025 100644 --- a/python-pdir2.spec +++ b/python-pdir2.spec @@ -4,7 +4,7 @@ Name: python-%{srcname} Version: 0.3.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Pretty dir() printing with joy License: MIT URL: https://pypi.python.org/pypi/%{srcname} @@ -12,6 +12,9 @@ URL: https://pypi.python.org/pypi/%{srcname} Source0: https://github.com/laike9m/pdir2/archive/v%{version}/pdir2-%{version}.tar.gz # https://github.com/laike9m/pdir2/issues/31 Patch0: remove-environment-markers.patch +# https://github.com/laike9m/pdir2/issues/39 +# Upstream only expects this test to pass on Python 2.7 and 3.6. +Patch1: xfail-test-pdir-class.patch BuildArch: noarch @@ -93,6 +96,9 @@ bpython, and Jupyter Notebook. %changelog +* Mon Jun 25 2018 Carl George - 0.3.0-3 +- Add patch1 to mark test_pdir_class as an expected fail + * Tue Jun 19 2018 Miro HronĨok - 0.3.0-2 - Rebuilt for Python 3.7 diff --git a/xfail-test-pdir-class.patch b/xfail-test-pdir-class.patch new file mode 100644 index 0000000..7b461c5 --- /dev/null +++ b/xfail-test-pdir-class.patch @@ -0,0 +1,32 @@ +From ce9e0a1326ba9ac0b18328f890ba27183e945e16 Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Mon, 25 Jun 2018 10:12:17 -0500 +Subject: [PATCH] Mark test_pdir_class as an expected fail + +Calling `dir` in different versions of Python gives different results. +Allow this test to fail to allow new Python versions to pass the test +suite before their data is explicitly added. +--- + tests/test_pdir_format.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test_pdir_format.py b/tests/test_pdir_format.py +index c681c36..d2874d2 100644 +--- a/tests/test_pdir_format.py ++++ b/tests/test_pdir_format.py +@@ -1,6 +1,7 @@ + import sys + + import pdir ++import pytest + + + def test_pdir_module(): +@@ -54,6 +55,7 @@ def what(self): + print(result) # TODO: add real test. + + ++@pytest.mark.xfail + def test_pdir_class(): + class T(object): + pass