Hello community,

here is the log from the commit of package python-asciimatics for 
openSUSE:Factory checked in at 2019-05-13 14:50:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-asciimatics (Old)
 and      /work/SRC/openSUSE:Factory/.python-asciimatics.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-asciimatics"

Mon May 13 14:50:10 2019 rev:2 rq:701754 version:1.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-asciimatics/python-asciimatics.changes    
2018-12-19 13:49:55.679242211 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-asciimatics.new.5148/python-asciimatics.changes
  2019-05-13 14:50:13.626741452 +0200
@@ -1,0 +2,8 @@
+Thu May  9 01:33:20 UTC 2019 - John Vandenberg <[email protected]>
+
+- Activate test suite
+- Add missing runtime dependency python-curses
+- Add CHANGES.rst, README.rst and doc/*.rst to %doc
+- Add patch pr_200.patch to tweak some tests
+
+-------------------------------------------------------------------

Old:
----
  asciimatics-1.10.0-py2.py3-none-any.whl

New:
----
  asciimatics-1.10.0.tar.gz
  pr_200.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-asciimatics.spec ++++++
--- /var/tmp/diff_new_pack.c6jXJG/_old  2019-05-13 14:50:14.522743709 +0200
+++ /var/tmp/diff_new_pack.c6jXJG/_new  2019-05-13 14:50:14.526743719 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-asciimatics
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,19 +24,27 @@
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            https://github.com/peterbrittain/asciimatics
-Source0:        
https://files.pythonhosted.org/packages/py2.py3/a/asciimatics/asciimatics-%{version}-py2.py3-none-any.whl
-BuildRequires:  %{python_module Pillow >= 2.7.0}
-BuildRequires:  %{python_module future}
-BuildRequires:  %{python_module pip}
-BuildRequires:  %{python_module pyfiglet >= 0.7.2}
-BuildRequires:  %{python_module wcwidth}
+Source:         
https://files.pythonhosted.org/packages/source/a/asciimatics/asciimatics-%{version}.tar.gz
+# isatty test skips see https://github.com/peterbrittain/asciimatics/issues/216
+Patch0:         pr_200.patch
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-Pillow >= 2.7.0
+Requires:       python-curses
 Requires:       python-future
 Requires:       python-pyfiglet >= 0.7.2
 Requires:       python-wcwidth
 BuildArch:      noarch
+# SECTION test requirements
+BuildRequires:  %{python_module Pillow >= 2.7.0}
+BuildRequires:  %{python_module curses}
+BuildRequires:  %{python_module future}
+BuildRequires:  %{python_module mock}
+BuildRequires:  %{python_module nose}
+BuildRequires:  %{python_module pyfiglet >= 0.7.2}
+BuildRequires:  %{python_module wcwidth}
+# /SECTION
 %python_subpackages
 
 %description
@@ -44,18 +52,24 @@
 (from interactive forms to ASCII animations) on any platform.
 
 %prep
-%setup -q -c -T
+%setup -q -n asciimatics-%{version}
+%patch0 -p1
+sed -i '/setup_requires/d' setup.py
 
 %build
-# Not Needed
+%python_build
 
 %install
-%python_expand pip%{$python_bin_suffix} install --root=%{buildroot} %{SOURCE0}
+%python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
+%check
+# test_image_files requires specific version of Pillow
+%python_exec -m nose -v -e test_image_files
+
 %files %{python_files}
-%doc %{python_sitelib}/asciimatics-*.dist-info/DESCRIPTION.rst
-%license %{python_sitelib}/asciimatics-*.dist-info/LICENSE.txt
+%doc CHANGES.rst README.rst doc/source/*.rst doc/source/*.png
+%license LICENSE
 %{python_sitelib}/*
 
 %changelog

++++++ pr_200.patch ++++++
>From 44bb07b4c2f582b486c060b5bb4c6fad05198827 Mon Sep 17 00:00:00 2001
From: Peter Brittain <[email protected]>
Date: Mon, 28 Jan 2019 09:50:50 +0000
Subject: [PATCH] Skip tests that require a TTY when none is available - for
 #199

---
 tests/test_effects.py   |  2 ++
 tests/test_renderers.py | 12 ++++++++++--
 tests/test_screen.py    |  2 ++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/tests/test_effects.py b/tests/test_effects.py
index bc5e37b..ce9ca3c 100644
--- a/tests/test_effects.py
+++ b/tests/test_effects.py
@@ -45,6 +45,8 @@ def test_text_effects(self):
         # This typically means we're running inside a non-standard termina;.
         # For example, thi happens when embedded in PyCharm.
         if sys.platform != "win32":
+            if not sys.stdout.isatty():
+                self.skipTest("Not a valid TTY")
             curses.initscr()
             if curses.tigetstr("ri") is None:
                 self.skipTest("No valid terminal definition")
diff --git a/tests/test_renderers.py b/tests/test_renderers.py
index 9af6adf..97568f0 100644
--- a/tests/test_renderers.py
+++ b/tests/test_renderers.py
@@ -185,6 +185,8 @@ def test_colour_image_file(self):
         # This typically means we're running inside a non-standard terminal.
         # For example, this happens when embedded in PyCharm.
         if sys.platform != "win32":
+            if not sys.stdout.isatty():
+                self.skipTest("Not a valid TTY")
             curses.initscr()
             if curses.tigetstr("ri") is None:
                 self.skipTest("No valid terminal definition")
@@ -254,6 +256,8 @@ def test_uni_image_files(self):
         # This typically means we're running inside a non-standard terminal.
         # For example, this happens when embedded in PyCharm.
         if sys.platform != "win32":
+            if not sys.stdout.isatty():
+                self.skipTest("Not a valid TTY")
             curses.initscr()
             if curses.tigetstr("ri") is None:
                 self.skipTest("No valid terminal definition")
@@ -298,8 +302,12 @@ def test_rainbow(self):
         # Skip for non-Windows if the terminal definition is incomplete.
         # This typically means we're running inside a non-standard terminal.
         # For example, this happens when embedded in PyCharm.
-        if sys.platform != "win32" and curses.tigetstr("ri") is None:
-            self.skipTest("No valid terminal definition")
+        if sys.platform != "win32":
+            if not sys.stdout.isatty():
+                self.skipTest("Not a valid TTY")
+            curses.initscr()
+            if curses.tigetstr("ri") is None:
+                self.skipTest("No valid terminal definition")
 
         def internal_checks(screen):
             # Create a base renderer
diff --git a/tests/test_screen.py b/tests/test_screen.py
index c30fe79..d669102 100644
--- a/tests/test_screen.py
+++ b/tests/test_screen.py
@@ -46,6 +46,8 @@ def setUp(self):
         # This typically means we're running inside a non-standard terminal.
         # For example, this happens when embedded in PyCharm.
         if sys.platform != "win32":
+            if not sys.stdout.isatty():
+                self.skipTest("Not a valid TTY")
             curses.initscr()
             if curses.tigetstr("ri") is None:
                 self.skipTest("No valid terminal definition")

Reply via email to