Hello community,

here is the log from the commit of package python-spyder-unittest for 
openSUSE:Factory checked in at 2018-08-18 00:03:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-spyder-unittest (Old)
 and      /work/SRC/openSUSE:Factory/.python-spyder-unittest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-spyder-unittest"

Sat Aug 18 00:03:21 2018 rev:2 rq:629428 version:0.3.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-spyder-unittest/python-spyder-unittest.changes
    2018-05-15 10:31:09.349138142 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-spyder-unittest.new/python-spyder-unittest.changes
       2018-08-18 00:03:23.090946653 +0200
@@ -1,0 +2,15 @@
+Mon Aug 13 18:01:56 UTC 2018 - [email protected]
+
+- Update to 0.3.1
+  + Issues Closed
+    * Rename "py.test" to "pytest" throughout
+    * NameError in test file causes internal error
+    * Plugin confused by tests writing to `sys.__stdout__`
+  + Pull Requests Merged
+    * PR: Update readme to remove funding appeal, harmonize with other readmes 
and minor fixes
+    * Remove unused variables when initializing localization
+    * Replace 'py.test' by 'pytest'
+    * Use str() to convert pytest's longrepr to a string
+    * Use ZMQ sockets to communicate results of pytest run
+
+-------------------------------------------------------------------

Old:
----
  spyder_unittest-0.3.0.tar.gz

New:
----
  spyder_unittest-0.3.1.tar.gz

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

Other differences:
------------------
++++++ python-spyder-unittest.spec ++++++
--- /var/tmp/diff_new_pack.EYty4x/_old  2018-08-18 00:03:23.562948062 +0200
+++ /var/tmp/diff_new_pack.EYty4x/_new  2018-08-18 00:03:23.566948075 +0200
@@ -17,9 +17,8 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without  test
 Name:           python-spyder-unittest
-Version:        0.3.0
+Version:        0.3.1
 Release:        0
 Summary:        Plugin to run tests from within the Spyder IDE
 License:        MIT
@@ -30,20 +29,13 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-%if %{with test}
-BuildRequires:  %{python_module lxml}
-BuildRequires:  %{python_module pytest}
-BuildRequires:  python-mock
-BuildRequires:  spyder >= 3
-BuildRequires:  spyder3 >= 3
-%endif
 BuildArch:      noarch
 
 %python_subpackages
 
 %description
-Spyder is a scientific python development environment and an
-alternative to IDLE.
+Spyder, the Scientific Python Development Environment, is an
+open-source IDE for researchers, engineers and data analysts.
 
 This is a plugin for the Spyder IDE that integrates popular unit test
 frameworks. It allows you to run tests and view the results.
@@ -55,8 +47,8 @@
 Requires:       spyder >= 3
 
 %description -n spyder-unittest
-Spyder is a scientific python development environment and an
-alternative to IDLE.
+Spyder, the Scientific Python Development Environment, is an
+open-source IDE for researchers, engineers and data analysts.
 
 This is a plugin for the Spyder IDE that integrates popular unit test
 frameworks. It allows you to run tests and view the results.
@@ -68,8 +60,8 @@
 Requires:       spyder3 >= 3
 
 %description -n spyder3-unittest
-Spyder is a scientific python development environment and an
-alternative to IDLE.
+Spyder, the Scientific Python Development Environment, is an
+open-source IDE for researchers, engineers and data analysts.
 
 This is a plugin for the Spyder IDE that integrates popular unit test
 frameworks. It allows you to run tests and view the results.
@@ -84,11 +76,6 @@
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-%if %{with test}
-%check
-%python_exec setup.py test
-%endif
-
 %files -n spyder-unittest
 %defattr(-,root,root,-)
 %doc CHANGELOG.md README.md

++++++ spyder_unittest-0.3.0.tar.gz -> spyder_unittest-0.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spyder_unittest-0.3.0/CHANGELOG.md 
new/spyder_unittest-0.3.1/CHANGELOG.md
--- old/spyder_unittest-0.3.0/CHANGELOG.md      2018-02-16 15:49:11.000000000 
+0100
+++ new/spyder_unittest-0.3.1/CHANGELOG.md      2018-06-15 23:06:16.000000000 
+0200
@@ -1,5 +1,27 @@
 # History of changes
 
+## Version 0.3.1 (2018/06/15)
+
+This version fixes some bugs and also includes some cosmetic changes.
+
+### Issues Closed
+
+* [Issue 117](https://github.com/spyder-ide/spyder-unittest/issues/117) - 
Rename "py.test" to "pytest" throughout ([PR 
119](https://github.com/spyder-ide/spyder-unittest/pull/119))
+* [Issue 113](https://github.com/spyder-ide/spyder-unittest/issues/113) - 
NameError in test file causes internal error ([PR 
118](https://github.com/spyder-ide/spyder-unittest/pull/118))
+* [Issue 112](https://github.com/spyder-ide/spyder-unittest/issues/112) - 
Plugin confused by tests writing to sys.__stdout__ ([PR 
114](https://github.com/spyder-ide/spyder-unittest/pull/114))
+
+In this release 3 issues were closed.
+
+### Pull Requests Merged
+
+* [PR 121](https://github.com/spyder-ide/spyder-unittest/pull/121) - PR: 
Update readme to remove funding appeal, harmonize with other readmes and minor 
fixes ([](a few obvious bugs/typos in the text. You can preview the full 
changes live over on [my 
repo](https://github.com/CAM-Gerlach/spyder-unittest/blob/update-readme/issues/))
+* [PR 120](https://github.com/spyder-ide/spyder-unittest/pull/120) - Remove 
unused variables when initializing localization
+* [PR 119](https://github.com/spyder-ide/spyder-unittest/pull/119) - Replace 
'py.test' by 'pytest' 
([117](https://github.com/spyder-ide/spyder-unittest/issues/117))
+* [PR 118](https://github.com/spyder-ide/spyder-unittest/pull/118) - Use str() 
to convert pytest's longrepr to a string 
([113](https://github.com/spyder-ide/spyder-unittest/issues/113))
+* [PR 114](https://github.com/spyder-ide/spyder-unittest/pull/114) - Use ZMQ 
sockets to communicate results of pytest run 
([112](https://github.com/spyder-ide/spyder-unittest/issues/112))
+
+In this release 5 pull requests were closed.
+
 ## Version 0.3.0 (2018/02/16)
 
 This version includes improved support of `py.test` (test results are 
displayed as they come in, double clicking on a test result opens the test in 
the editor) as well as various other improvements.
@@ -114,4 +136,4 @@
 
 ## Version 0.1.0 (2017/02/05)
 
-Initial release, supporting nose and py.test frameworks.
\ No newline at end of file
+Initial release, supporting nose and py.test frameworks.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spyder_unittest-0.3.0/PKG-INFO 
new/spyder_unittest-0.3.1/PKG-INFO
--- old/spyder_unittest-0.3.0/PKG-INFO  2018-02-16 15:51:22.000000000 +0100
+++ new/spyder_unittest-0.3.1/PKG-INFO  2018-06-15 23:12:31.000000000 +0200
@@ -1,20 +1,17 @@
 Metadata-Version: 1.1
 Name: spyder_unittest
-Version: 0.3.0
+Version: 0.3.1
 Summary: Plugin to run tests from within the Spyder IDE
 Home-page: https://github.com/spyder-ide/spyder-unittest
 Author: Spyder Project Contributors
 Author-email: UNKNOWN
 License: MIT
-Description-Content-Type: UNKNOWN
 Description: 
         This is a plugin for the Spyder IDE that integrates popular unit test
         frameworks. It allows you to run tests and view the results.
         
-        **Status:**
-        This is a work in progress. It is useable, but only the basic 
functionality
-        is implemented at the moment. The plugin currently supports the 
py.test and nose
-        testing frameworks.
+        The plugin supports the `unittest` framework in the Python
+        standard library and the `pytest` and `nose` testing frameworks.
         
 Keywords: Qt PyQt4 PyQt5 spyder plugins testing
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spyder_unittest-0.3.0/README.md 
new/spyder_unittest-0.3.1/README.md
--- old/spyder_unittest-0.3.0/README.md 2018-02-16 15:42:01.000000000 +0100
+++ new/spyder_unittest-0.3.1/README.md 2018-06-15 23:07:26.000000000 +0200
@@ -1,49 +1,31 @@
-# spyder-unittest
+# Spyder-Unittest
 
-## Project information
 [![license](https://img.shields.io/pypi/l/spyder-unittest.svg)](./LICENSE)
-[![pypi 
version](https://img.shields.io/pypi/v/spyder-unittest.svg)](https://pypi.python.org/pypi/spyder-unittest)
-[![Join the chat at 
https://gitter.im/spyder-ide/public](https://badges.gitter.im/spyder-ide/spyder.svg)](https://gitter.im/spyder-ide/public)
+[![pypi 
version](https://img.shields.io/pypi/v/spyder-unittest.svg)](https://pypi.org/project/spyder-unittest/)
+[![conda 
version](https://img.shields.io/conda/v/spyder-ide/spyder-unittest.svg)](https://www.anaconda.com/download/)
+[![download 
count](https://img.shields.io/conda/d/spyder-ide/spyder-unittest.svg)](https://www.anaconda.com/download/)
 [![OpenCollective 
Backers](https://opencollective.com/spyder/backers/badge.svg?color=blue)](#backers)
-[![OpenCollective 
Sponsors](https://opencollective.com/spyder/sponsors/badge.svg?color=blue)](#sponsors)
-
-## Build status
+[![Join the chat at 
https://gitter.im/spyder-ide/public](https://badges.gitter.im/spyder-ide/spyder.svg)](https://gitter.im/spyder-ide/public)<br>
+[![PyPI 
status](https://img.shields.io/pypi/status/spyder-unittest.svg)](https://github.com/spyder-ide/spyder-unittest)
 [![Build 
Status](https://travis-ci.org/spyder-ide/spyder-unittest.svg?branch=master)](https://travis-ci.org/spyder-ide/spyder-unittest)
 [![Build 
status](https://ci.appveyor.com/api/projects/status/d9wa6whp1fpq4uii?svg=true)](https://ci.appveyor.com/project/spyder-ide/spyder-unittest)
 
[![CircleCI](https://circleci.com/gh/spyder-ide/spyder-unittest/tree/master.svg?style=shield)](https://circleci.com/gh/spyder-ide/spyder-unittest/tree/master)
 [![Coverage 
Status](https://coveralls.io/repos/github/spyder-ide/spyder-unittest/badge.svg?branch=master)](https://coveralls.io/github/spyder-ide/spyder-unittest?branch=master)
 
-----
-
-## Important Announcement: Spyder is unfunded!
-
-Since mid November/2017, [Anaconda, Inc](https://www.anaconda.com/) has
-stopped funding Spyder development, after doing it for the past 18
-months. Because of that, development will focus from now on maintaining
-Spyder 3 at a much slower pace than before.
-
-If you want to contribute to maintain Spyder, please consider donating at
-
-https://opencollective.com/spyder
+*Copyright © 2014–2018 Spyder Project Contributors*
 
-We appreciate all the help you can provide us and can't thank you enough for
-supporting the work of Spyder devs and Spyder development.
+![Screenshot of spyder-unittest plugin showing test results](./screenshot.png)
 
-If you want to know more about this, please read this
-[page](https://github.com/spyder-ide/spyder/wiki/Anaconda-stopped-funding-Spyder).
-
-----
 
 ## Description
 
-![screenshot](./screenshot.png)
+Spyder-unittest is a plugin that integrates popular unit test frameworks
+with Spyder, allowing you to run test suites and view the results in the IDE.
 
-This is a plugin for Spyder that integrates popular unit test
-frameworks. It allows you to run tests and view the results.
+The plugin supports the `unittest` module in the Python standard library
+as well as the `pytest` and `nose` testing frameworks.
+Support for `pytest` is most complete at the moment.
 
-The plugin supports the `unittest` framework in the Python
-standard library and the `py.test` and `nose` testing frameworks.
-Support for `py.test` is most complete at the moment.
 
 ## Installation
 
@@ -53,27 +35,32 @@
 * Using Anaconda: `conda install -c spyder-ide spyder-unittest`
 * Using pip: `pip install spyder-unittest`
 
-All dependencies will be automatically installed. You have to restart Spyder 
before
-you can use the plugin.
+All dependencies will be automatically installed.
+You have to restart Spyder before you can use the plugin.
+
 
 ## Usage
 
 The plugin adds an item `Run unit tests` to the `Run` menu in Spyder.
-Click on this to run the unit tests. After you specify the testing framework 
-and the directory under which the tests are stored, the tests are run. 
-The `Unit testing` window pane (displayed at the top of this file) will pop up 
-with the results. If you are using `py.test`, you can double-click on a test
+Click on this to run the unit tests. After you specify the testing framework
+and the directory under which the tests are stored, the tests are run.
+The `Unit testing` window pane (displayed at the top of this file) will pop up
+with the results. If you are using `pytest`, you can double-click on a test
 to view it in the editor.
 
 If you want to run tests in a different directory or switch testing
-frameworks, click `Configure` in the Options menu (cogwheel icon), 
+frameworks, click `Configure` in the Options menu (cogwheel icon),
 which is located in the upper right corner of the `Unit testing` pane.
 
+
 ## Feedback
 
 Bug reports, feature requests and other ideas are more than welcome on the
 [issue tracker](https://github.com/spyder-ide/spyder-unittest/issues).
-You may use <http://groups.google.com/group/spyderlib> for general discussion.
+Use the [Spyder Google Group](https://groups.google.com/group/spyderlib)
+or our [Gitter Chatroom](https://gitter.im/spyder-ide/public)
+for general discussion.
+
 
 ## Development
 
@@ -85,15 +72,15 @@
 
 * [spyder](https://github.com/spyder-ide/spyder) (obviously), at least version 
3.0
 * [lxml](http://lxml.de/)
-* the testing framework that you will be using: [py.test](https://pytest.org)
+* the testing framework that you will be using: [pytest](https://pytest.org)
   and/or [nose](https://nose.readthedocs.io)
 
 In order to run the tests distributed with this plugin, you need
-[nose](https://nose.readthedocs.io), [py.test](https://pytest.org) 
-and [pytest-qt](https://github.com/pytest-dev/pytest-qt). If you use Python 2, 
+[nose](https://nose.readthedocs.io), [pytest](https://pytest.org)
+and [pytest-qt](https://github.com/pytest-dev/pytest-qt). If you use Python 2,
 you also need [mock](https://github.com/testing-cabal/mock).
 
-You are very welcome to submit code contributations in the form of pull
+You are very welcome to submit code contributions in the form of pull
 requests to the
 [issue tracker](https://github.com/spyder-ide/spyder-unittest/issues).
 GitHub is configured to run pull requests automatically against the test suite
@@ -102,18 +89,36 @@
 The style checkers can be rather finicky so you may want to install ciocheck
 locally and run them before submitting the code.
 
+
 ## Contributing
 
-Everyone is welcome to contribute!
+Everyone is welcome to contribute! The document [Contributing to Spyder](
+https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md)
+also applies to the unittest plugin.
+
+We are grateful to the entire Spyder community for their support, without which
+this plugin and the whole of Spyder would be a lot less awesome.
+
+
+## More information
+
+[Main Website](https://www.spyder-ide.org/)
+
+[Download Spyder (with Anaconda)](https://www.anaconda.com/download/)
+
+[Spyder Github](https://github.com/spyder-ide/spyder)
+
+[Troubleshooting Guide and FAQ](
+https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ)
 
-## Backers
+[Development Wiki](https://github.com/spyder-ide/spyder/wiki/Dev:-Index)
 
-Support us with a monthly donation and help us continue our activities.
+[Gitter Chatroom](https://gitter.im/spyder-ide/public)
 
-[![Backers](https://opencollective.com/spyder/backers.svg)](https://opencollective.com/spyder#support)
+[Google Group](https://groups.google.com/group/spyderlib)
 
-## Sponsors
+[@Spyder_IDE on Twitter](https://twitter.com/spyder_ide)
 
-Become a sponsor to get your logo on our README on Github.
+[@SpyderIDE on Facebook](https://www.facebook.com/SpyderIDE/)
 
-[![Sponsors](https://opencollective.com/spyder/sponsors.svg)](https://opencollective.com/spyder#support)
+[Support Spyder on OpenCollective](https://opencollective.com/spyder/)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spyder_unittest-0.3.0/setup.py 
new/spyder_unittest-0.3.1/setup.py
--- old/spyder_unittest-0.3.0/setup.py  2017-09-28 16:24:42.000000000 +0200
+++ new/spyder_unittest-0.3.1/setup.py  2018-06-06 20:45:39.000000000 +0200
@@ -37,7 +37,7 @@
 
 
 # Requirements
-REQUIREMENTS = ['lxml', 'spyder>=3']
+REQUIREMENTS = ['lxml', 'spyder>=3', 'pyzmq']
 EXTLIST = ['.jpg', '.png', '.json', '.mo', '.ini']
 LIBNAME = 'spyder_unittest'
 
@@ -46,10 +46,8 @@
 This is a plugin for the Spyder IDE that integrates popular unit test
 frameworks. It allows you to run tests and view the results.
 
-**Status:**
-This is a work in progress. It is useable, but only the basic functionality
-is implemented at the moment. The plugin currently supports the py.test and 
nose
-testing frameworks.
+The plugin supports the `unittest` framework in the Python
+standard library and the `pytest` and `nose` testing frameworks.
 """
 
 setup(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spyder_unittest-0.3.0/spyder_unittest/__init__.py 
new/spyder_unittest-0.3.1/spyder_unittest/__init__.py
--- old/spyder_unittest-0.3.0/spyder_unittest/__init__.py       2018-02-16 
15:50:35.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/__init__.py       2018-06-15 
23:09:09.000000000 +0200
@@ -8,5 +8,5 @@
 # Local imports
 from .unittestplugin import UnitTestPlugin as PLUGIN_CLASS
 
-__version__ = '0.3.0'
+__version__ = '0.3.1'
 PLUGIN_CLASS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/jsonstream.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/jsonstream.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/jsonstream.py     
2017-12-18 15:17:14.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/jsonstream.py     
1970-01-01 01:00:00.000000000 +0100
@@ -1,109 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2013 Spyder Project Contributors
-# Licensed under the terms of the MIT License
-# (see LICENSE.txt for details)
-r"""
-Reader and writer for sending stream of python objects using JSON.
-
-These classes can be used to send Python objects (specifically, ints, floats,
-strings, bools, lists, dictionaries or None) over a text stream. Partially
-received objects are correctly handled.
-
-Since multiple JSON-encoded objects cannot simply concatenated (i.e., JSON is
-not a framed protocol), every object is sent over the text channel in the
-format "N \n s \n", where the string s is its JSON encoding and N is the length
-of s.
-"""
-
-# Standard library imports
-import json
-
-# Third party imports
-from spyder.py3compat import PY2, to_text_string
-
-
-class JSONStreamWriter:
-    """
-    Writer for sending stream of python objects using JSON.
-
-    This class can be used to send a stream of python objects over a text
-    stream using JSON. It is the responsibility of the caller to open and
-    close the stream.
-
-    Attributes
-    ----------
-    stream : TextIOBase
-        text stream that the objects are sent over.
-    """
-
-    def __init__(self, stream):
-        """Constructor."""
-        self.stream = stream
-
-    def write(self, obj):
-        """
-        Write Python object to the stream and flush.
-
-        Arguments
-        ---------
-        obj : object
-            Object to be written. The type should be supported by JSON (i.e.,
-            int, float, str, bool, list, dict or None).
-        """
-        txt = json.dumps(obj)
-        if PY2:
-            txt = to_text_string(txt)
-        self.stream.write(to_text_string(len(txt)) + '\n')
-        self.stream.write(txt + '\n')
-        self.stream.flush()
-
-
-class JSONStreamReader:
-    """
-    Reader for sending stream of Python objects using JSON.
-
-    This class is used to receive a stream sent by JSONStreamWriter.
-
-    Attributes
-    ----------
-    buffer : str
-       Text encoding an object that has not been completely received yet.
-    """
-
-    def __init__(self):
-        """Constructor."""
-        self.buffer = ''
-
-    def consume(self, txt):
-        """
-        Decode given text and return list of objects encoded in it.
-
-        If only a part of the encoded text of an object is passed, then it is
-        stored and combined with the remainder in the next call.
-        """
-        index = 0
-        res = []
-        txt = self.buffer + txt
-        while index < len(txt):
-            has_r = False  # whether line ends with \r\n or \n
-            end_of_line1 = txt.find('\n', index)
-            try:
-                len_encoding = int(txt[index:end_of_line1])
-            except ValueError:
-                raise ValueError('txt = %s  index = %d  end_of_line1 = %d'
-                                 % (repr(txt), index, end_of_line1))
-            if end_of_line1 + len_encoding + 2 > len(txt):  # 2 for two \n
-                break
-            if txt[end_of_line1 + len_encoding + 1] == '\r':
-                if end_of_line1 + len_encoding + 3 > len(txt):
-                    break
-                else:
-                    has_r = True
-            encoding = txt[end_of_line1 + 1:end_of_line1 + len_encoding + 1]
-            res.append(json.loads(encoding))
-            index = end_of_line1 + len_encoding + 2
-            if has_r:
-                index += 1
-        self.buffer = txt[index:]
-        return res
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/noserunner.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/noserunner.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/noserunner.py     
2018-01-15 14:42:02.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/noserunner.py     
2018-06-15 23:07:26.000000000 +0200
@@ -14,7 +14,7 @@
 
 try:
     _ = get_translation("unittest", dirname="spyder_unittest")
-except KeyError as error:
+except KeyError:
     import gettext
     _ = gettext.gettext
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/pytestrunner.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/pytestrunner.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/pytestrunner.py   
2018-02-16 15:01:43.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/pytestrunner.py   
2018-06-06 20:45:39.000000000 +0200
@@ -3,47 +3,35 @@
 # Copyright © 2013 Spyder Project Contributors
 # Licensed under the terms of the MIT License
 # (see LICENSE.txt for details)
-"""Support for py.test framework."""
+"""Support for pytest framework."""
 
 # Standard library imports
 import os
 import os.path as osp
 
 # Local imports
-from spyder_unittest.backend.jsonstream import JSONStreamReader
 from spyder_unittest.backend.runnerbase import Category, RunnerBase, TestResult
+from spyder_unittest.backend.zmqstream import ZmqStreamReader
 
 
 class PyTestRunner(RunnerBase):
-    """Class for running tests within py.test framework."""
+    """Class for running tests within pytest framework."""
 
     module = 'pytest'
-    name = 'py.test'
+    name = 'pytest'
 
     def create_argument_list(self):
         """Create argument list for testing process."""
         pyfile = os.path.join(os.path.dirname(__file__), 'pytestworker.py')
-        return [pyfile]
-
-    def _prepare_process(self, config, pythonpath):
-        """Prepare and return process for running the unit test suite."""
-        process = RunnerBase._prepare_process(self, config, pythonpath)
-        process.readyReadStandardOutput.connect(self.read_output)
-        return process
+        return [pyfile, str(self.reader.port)]
 
     def start(self, config, pythonpath):
         """Start process which will run the unit test suite."""
         self.config = config
-        self.reader = JSONStreamReader()
-        self.output = ''
+        self.reader = ZmqStreamReader()
+        self.reader.sig_received.connect(self.process_output)
         RunnerBase.start(self, config, pythonpath)
 
-    def read_output(self):
-        """Called when test process emits output."""
-        output = self.read_all_process_output()
-        result = self.reader.consume(output)
-        self.process_output(result)
-
     def process_output(self, output):
         """
         Process output of test process.
@@ -88,7 +76,9 @@
 
         This function emits `sig_finished`.
         """
-        self.sig_finished.emit(None, self.output)
+        self.reader.close()
+        output = self.read_all_process_output()
+        self.sig_finished.emit(None, output)
 
 
 def normalize_module_name(name):
@@ -137,7 +127,7 @@
     message = report['message'] if 'message' in report else ''
     if 'longrepr' not in report:
         extra_text = ''
-    elif isinstance(report['longrepr'], list):
+    elif isinstance(report['longrepr'], tuple):
         extra_text = report['longrepr'][2]
     else:
         extra_text = report['longrepr']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/pytestworker.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/pytestworker.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/pytestworker.py   
2018-02-08 16:59:08.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/pytestworker.py   
2018-06-06 20:45:39.000000000 +0200
@@ -4,38 +4,37 @@
 # Licensed under the terms of the MIT License
 # (see LICENSE.txt for details)
 """
-Script for running py.test tests.
+Script for running pytest tests.
 
 This script is meant to be run in a separate process by a PyTestRunner.
-It runs tests via the py.test framework and prints the results so that the
+It runs tests via the pytest framework and prints the results so that the
 PyTestRunner can read them.
 """
 
 # Standard library imports
-import io
 import sys
 
 # Third party imports
 import pytest
 
 # Local imports
-from spyder_unittest.backend.jsonstream import JSONStreamWriter
+from spyder_unittest.backend.zmqstream import ZmqStreamWriter
 
 
-class StdoutBuffer(io.TextIOWrapper):
-    """
-    Wrapper for binary stream which accepts both text and binary strings.
-
-    Source: https://stackoverflow.com/a/19344871
-    """
-
-    def write(self, string):
-        """Write text or binary string to underlying stream."""
-        try:
-            return super(StdoutBuffer, self).write(string)
-        except TypeError:
-            # redirect encoded byte strings directly to buffer
-            return super(StdoutBuffer, self).buffer.write(string)
+class FileStub():
+    """Stub for ZmqStreamWriter which instead writes to a file."""
+
+    def __init__(self, filename):
+        """Constructor; connect to specified filename."""
+        self.file = open(filename, 'w')
+
+    def write(self, obj):
+        """Write Python object to file."""
+        self.file.write(str(obj) + '\n')
+
+    def close(self):
+        """Close file."""
+        self.file.close()
 
 
 class SpyderPlugin():
@@ -46,16 +45,16 @@
         self.writer = writer
 
     def pytest_collectreport(self, report):
-        """Called by py.test after collecting tests from a file."""
+        """Called by pytest after collecting tests from a file."""
         if report.outcome == 'failed':
             self.writer.write({
                     'event': 'collecterror',
                     'nodeid': report.nodeid,
-                    'longrepr': report.longrepr.longrepr
+                    'longrepr': str(report.longrepr)
             })
 
     def pytest_itemcollected(self, item):
-        """Called by py.test when a test item is collected."""
+        """Called by pytest when a test item is collected."""
         nodeid = item.name
         x = item.parent
         while x.parent:
@@ -67,14 +66,14 @@
         })
 
     def pytest_runtest_logstart(self, nodeid, location):
-        """Called by py.test before running a test."""
+        """Called by pytest before running a test."""
         self.writer.write({
             'event': 'starttest',
             'nodeid': nodeid
         })
 
     def pytest_runtest_logreport(self, report):
-        """Called by py.test when a (phase of a) test is completed."""
+        """Called by pytest when a (phase of a) test is completed."""
         if report.when in ['setup', 'teardown'] and report.outcome == 'passed':
             return
         data = {'event': 'logreport',
@@ -98,19 +97,14 @@
 
 
 def main(args):
-    """Run py.test with the Spyder plugin."""
-    old_stdout = sys.stdout
-    stdout_buffer = StdoutBuffer(io.BytesIO(), sys.stdout.encoding)
-    sys.stdout = stdout_buffer
-
-    writer = JSONStreamWriter(old_stdout)
-    pytest.main(args, plugins=[SpyderPlugin(writer)])
-
-    stdout_buffer.seek(0)
-    data = {'event': 'finished', 'stdout': stdout_buffer.read()}
-    writer.write(data)
-    sys.stdout = old_stdout
+    """Run pytest with the Spyder plugin."""
+    if args[1] == 'file':
+        writer = FileStub('pytestworker.log')
+    else:
+        writer = ZmqStreamWriter(int(args[1]))
+    pytest.main(args[2:], plugins=[SpyderPlugin(writer)])
+    writer.close()
 
 
 if __name__ == '__main__':
-    main(sys.argv[1:])
+    main(sys.argv)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_jsonstream.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_jsonstream.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_jsonstream.py  
2018-01-15 14:42:02.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_jsonstream.py  
1970-01-01 01:00:00.000000000 +0100
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2017 Spyder Project Contributors
-# Licensed under the terms of the MIT License
-# (see LICENSE.txt for details)
-"""Tests for jsonstream.py"""
-
-# Standard library imports
-from io import StringIO, TextIOBase
-
-# Local imports
-from spyder_unittest.backend.jsonstream import (JSONStreamReader,
-                                                JSONStreamWriter)
-
-try:
-    from unittest.mock import create_autospec
-except ImportError:
-    from mock import create_autospec  # Python 2
-
-
-def test_jsonstreamwriter_with_list():
-    stream = StringIO()
-    writer = JSONStreamWriter(stream)
-    writer.write([1, 2])
-    assert stream.getvalue() == '6\n[1, 2]\n'
-
-
-def test_jsonstreamwriter_with_unicode():
-    stream = StringIO()
-    writer = JSONStreamWriter(stream)
-    writer.write(u'三')  # u prefix for Python2 compatibility
-    assert stream.getvalue() == '8\n"\\u4e09"\n'
-
-
-def test_jsonstreamwriter_flushes():
-    stream = create_autospec(TextIOBase)
-    writer = JSONStreamWriter(stream)
-    writer.write(1)
-    stream.flush.assert_called_once_with()
-
-
-def test_jsonstreamreader_with_list():
-    reader = JSONStreamReader()
-    assert reader.consume('6\n[1, 2]\n') == [[1, 2]]
-
-
-def test_jsonstreamreader_with_windows_lineending():
-    reader = JSONStreamReader()
-    assert reader.consume('6\r\n[1, 2]\r\n') == [[1, 2]]
-
-
-def test_jsonstreamreader_with_unicode():
-    reader = JSONStreamReader()
-    assert reader.consume('8\n"\\u4e09"\n') == [u'三']
-
-
-def test_jsonstreamreader_with_partial_frames():
-    reader = JSONStreamReader()
-    txt = '1\n2\n' * 3
-    assert reader.consume(txt[:2]) == []
-    assert reader.consume(txt[2:-2]) == [2, 2]
-    assert reader.consume(txt[-2:]) == [2]
-
-
-def test_jsonsteamreader_writer_integration():
-    stream = StringIO()
-    writer = JSONStreamWriter(stream)
-    reader = JSONStreamReader()
-    writer.write([1, 2])
-    writer.write({'a': 'b'})
-    assert reader.consume(stream.getvalue()) == [[1, 2], {'a': 'b'}]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_pytestrunner.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_pytestrunner.py
--- 
old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_pytestrunner.py    
    2018-02-16 15:01:43.000000000 +0100
+++ 
new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_pytestrunner.py    
    2018-06-06 20:45:39.000000000 +0200
@@ -45,14 +45,15 @@
     monkeypatch.setattr('spyder_unittest.backend.runnerbase.os.remove',
                         mock_remove)
 
-    MockJSONStreamReader = Mock()
+    MockZMQStreamReader = Mock()
     monkeypatch.setattr(
-        'spyder_unittest.backend.pytestrunner.JSONStreamReader',
-        MockJSONStreamReader)
-    mock_reader = MockJSONStreamReader()
+        'spyder_unittest.backend.pytestrunner.ZmqStreamReader',
+        MockZMQStreamReader)
+    mock_reader = MockZMQStreamReader()
+    mock_reader.port = 42
 
     runner = PyTestRunner(None, 'results')
-    config = Config('py.test', 'wdir')
+    config = Config('pytest', 'wdir')
     runner.start(config, ['pythondir'])
 
     mock_process.setWorkingDirectory.assert_called_once_with('wdir')
@@ -63,7 +64,7 @@
     workerfile = os.path.abspath(
         os.path.join(os.path.dirname(__file__), os.pardir, 'pytestworker.py'))
     mock_process.start.assert_called_once_with(
-        get_python_executable(), [workerfile])
+            get_python_executable(), [workerfile, '42'])
 
     mock_environment.insert.assert_any_call('VAR', 'VALUE')
     # mock_environment.insert.assert_any_call('PYTHONPATH', 'pythondir:old')
@@ -72,19 +73,6 @@
 
     assert runner.reader is mock_reader
 
-def test_pytestrunner_read_output(monkeypatch):
-    runner = PyTestRunner(None)
-    runner.process = Mock()
-    qbytearray = QByteArray(b'encoded')
-    runner.process.readAllStandardOutput = Mock(return_value=qbytearray)
-    runner.reader = Mock()
-    runner.reader.consume = Mock(return_value='decoded')
-    runner.process_output = Mock()
-
-    runner.read_output()
-    assert runner.reader.consume.called_once_with('encoded')
-    assert runner.process_output.called_once_with('decoded')
-
 def test_pytestrunner_process_output_with_collected(qtbot):
     runner = PyTestRunner(None)
     output = [{'event': 'collected', 'nodeid': 'spam.py::ham'},
@@ -156,7 +144,7 @@
     report = standard_logreport_output()
     report['when'] = 'setup'
     report['outcome'] = 'skipped'
-    report['longrepr'] = ['file', 24, 'skipmsg']
+    report['longrepr'] = ('file', 24, 'skipmsg')
     expected = TestResult(Category.SKIP, 'skipped', 'foo.bar',
                           time=42, extra_text='skipmsg',
                           filename=osp.join('ham', 'foo.py'), lineno=24)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_pytestworker.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_pytestworker.py
--- 
old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_pytestworker.py    
    2018-02-08 16:59:08.000000000 +0100
+++ 
new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_pytestworker.py    
    2018-06-06 20:45:39.000000000 +0200
@@ -12,13 +12,13 @@
 import pytest
 
 # Local imports
-from spyder_unittest.backend.jsonstream import JSONStreamWriter
 from spyder_unittest.backend.pytestworker import SpyderPlugin, main
+from spyder_unittest.backend.zmqstream import ZmqStreamWriter
 
 try:
-    from unittest.mock import call, create_autospec, Mock
+    from unittest.mock import call, create_autospec, MagicMock, Mock
 except ImportError:
-    from mock import call, create_autospec, Mock  # Python 2
+    from mock import call, create_autospec, MagicMock, Mock  # Python 2
 
 
 class EmptyClass:
@@ -27,7 +27,7 @@
 
 @pytest.fixture
 def plugin():
-    mock_writer = create_autospec(JSONStreamWriter)
+    mock_writer = create_autospec(ZmqStreamWriter)
     return SpyderPlugin(mock_writer)
 
 def test_spyderplugin_test_collectreport_with_success(plugin):
@@ -41,8 +41,8 @@
     report = EmptyClass()
     report.outcome = 'failed'
     report.nodeid = 'foo.py::bar'
-    report.longrepr = EmptyClass()
-    report.longrepr.longrepr = 'message'
+    report.longrepr = MagicMock()
+    report.longrepr.__str__.return_value = 'message'
     plugin.pytest_collectreport(report)
     plugin.writer.write.assert_called_once_with({
         'event': 'collecterror',
@@ -167,22 +167,6 @@
     plugin.pytest_runtest_logreport(report)
     plugin.writer.write.assert_not_called()
 
-def test_main_captures_stdout_and_stderr(monkeypatch):
-    def mock_main(args, plugins):
-        print('output')
-    monkeypatch.setattr(
-        'spyder_unittest.backend.pytestworker.pytest.main', mock_main)
-
-    mock_writer = create_autospec(JSONStreamWriter)
-    MockJSONStreamWriter = Mock(return_value=mock_writer)
-    monkeypatch.setattr(
-        'spyder_unittest.backend.pytestworker.JSONStreamWriter',
-        MockJSONStreamWriter)
-
-    main(None)
-    mock_writer.write.assert_called_once_with({
-            'event': 'finished', 'stdout': 'output\n'})
-
 def test_pytestworker_integration(monkeypatch, tmpdir):
     os.chdir(tmpdir.strpath)
     testfilename = tmpdir.join('test_foo.py').strpath
@@ -190,12 +174,12 @@
         f.write("def test_ok(): assert 1+1 == 2\n"
                 "def test_fail(): assert 1+1 == 3\n")
 
-    mock_writer = create_autospec(JSONStreamWriter)
-    MockJSONStreamWriter = Mock(return_value=mock_writer)
+    mock_writer = create_autospec(ZmqStreamWriter)
+    MockZmqStreamWriter = Mock(return_value=mock_writer)
     monkeypatch.setattr(
-        'spyder_unittest.backend.pytestworker.JSONStreamWriter',
-        MockJSONStreamWriter)
-    main([testfilename])
+        'spyder_unittest.backend.pytestworker.ZmqStreamWriter',
+        MockZmqStreamWriter)
+    main(['mockscriptname', '42', testfilename])
 
     args = mock_writer.write.call_args_list
 
@@ -228,6 +212,3 @@
     assert args[5][0][0]['filename'] == 'test_foo.py'
     assert args[5][0][0]['lineno'] == 1
     assert 'duration' in args[5][0][0]
-
-    assert args[6][0][0]['event'] == 'finished'
-    assert 'pytest' in args[6][0][0]['stdout']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_zmqstream.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_zmqstream.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/tests/test_zmqstream.py   
1970-01-01 01:00:00.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/tests/test_zmqstream.py   
2018-03-04 16:38:31.000000000 +0100
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2018 Spyder Project Contributors
+# Licensed under the terms of the MIT License
+# (see LICENSE.txt for details)
+"""Tests for zmqstream.py"""
+
+# Local imports
+from spyder_unittest.backend.zmqstream import ZmqStreamReader, ZmqStreamWriter
+
+
+def test_zmqstream(qtbot):
+    manager = ZmqStreamReader()
+    worker = ZmqStreamWriter(manager.port)
+    with qtbot.waitSignal(manager.sig_received) as blocker:
+        worker.write(42)
+    assert blocker.args == [[42]]
+    worker.close()
+    manager.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/backend/zmqstream.py 
new/spyder_unittest-0.3.1/spyder_unittest/backend/zmqstream.py
--- old/spyder_unittest-0.3.0/spyder_unittest/backend/zmqstream.py      
1970-01-01 01:00:00.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/backend/zmqstream.py      
2018-03-04 16:38:31.000000000 +0100
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2018 Spyder Project Contributors
+# Licensed under the terms of the MIT License
+# (see LICENSE.txt for details)
+"""
+Reader and writer for sending stream of python objects over a ZMQ socket.
+
+The intended usage is that you construct a reader in one process and a writer
+(with the same port number as the reader) in a worker process. The worker
+process can then use the stream to send its result to the reader.
+"""
+
+from __future__ import print_function
+
+# Standard library imports
+import sys
+
+# Third party imports
+from qtpy.QtCore import QObject, QProcess, QSocketNotifier, Signal
+from qtpy.QtWidgets import QApplication
+import zmq
+
+
+class ZmqStreamWriter:
+    """Writer for sending stream of Python object over a ZMQ stream."""
+
+    def __init__(self, port):
+        """
+        Constructor.
+
+        Arguments
+        ---------
+        port : int
+            TCP port number to be used for the stream. This should equal the
+            `port` attribute of the corresponding `ZmqStreamReader`.
+        """
+        context = zmq.Context()
+        self.socket = context.socket(zmq.PAIR)
+        self.socket.connect('tcp://localhost:{}'.format(port))
+
+    def write(self, obj):
+        """Write arbitrary Python object to stream."""
+        self.socket.send_pyobj(obj)
+
+    def close(self):
+        """Close stream."""
+        self.socket.close()
+
+
+class ZmqStreamReader(QObject):
+    """
+    Reader for receiving stream of Python objects via a ZMQ stream.
+
+    Attributes
+    ----------
+    port : int
+        TCP port number used for the stream.
+
+    Signals
+    -------
+    sig_received(list)
+        Emitted when objects are received; argument is list of received
+        objects.
+    """
+
+    sig_received = Signal(object)
+
+    def __init__(self):
+        """Constructor; also constructs ZMQ stream."""
+        super(QObject, self).__init__()
+        self.context = zmq.Context()
+        self.socket = self.context.socket(zmq.PAIR)
+        self.port = self.socket.bind_to_random_port('tcp://*')
+        fid = self.socket.getsockopt(zmq.FD)
+        self.notifier = QSocketNotifier(fid, QSocketNotifier.Read, self)
+        self.notifier.activated.connect(self.received_message)
+
+    def received_message(self):
+        """Called when a message is received."""
+        self.notifier.setEnabled(False)
+        messages = []
+        try:
+            while 1:
+                message = self.socket.recv_pyobj(flags=zmq.NOBLOCK)
+                messages.append(message)
+        except zmq.ZMQError:
+            pass
+        finally:
+            self.notifier.setEnabled(True)
+        if messages:
+            self.sig_received.emit(messages)
+
+    def close(self):
+        """Read any remaining messages and close stream."""
+        self.received_message()  # Flush remaining messages
+        self.notifier.setEnabled(False)
+        self.socket.close()
+        self.context.destroy()
+
+
+if __name__ == '__main__':
+    # For testing, construct a ZMQ stream between two processes and send
+    # the number 42 over the stream
+    if len(sys.argv) == 1:
+        app = QApplication(sys.argv)
+        manager = ZmqStreamReader()
+        manager.sig_received.connect(print)
+        process = QProcess()
+        process.start('python', [sys.argv[0], str(manager.port)])
+        process.finished.connect(app.quit)
+        sys.exit(app.exec_())
+    else:
+        worker = ZmqStreamWriter(sys.argv[1])
+        worker.write(42)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/tests/test_unittestplugin.py 
new/spyder_unittest-0.3.1/spyder_unittest/tests/test_unittestplugin.py
--- old/spyder_unittest-0.3.0/spyder_unittest/tests/test_unittestplugin.py      
2018-02-02 14:40:04.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/tests/test_unittestplugin.py      
2018-06-06 20:45:39.000000000 +0200
@@ -105,10 +105,10 @@
     assert plugin.unittestwidget.config is None
 
     # Set config and test that this is recorded in config file
-    config = Config(framework='ham', wdir=str(tmpdir))
+    config = Config(framework='unittest', wdir=str(tmpdir))
     with qtbot.waitSignal(plugin.unittestwidget.sig_newconfig):
         plugin.unittestwidget.config = config
-    assert 'framework = ham' in config_file_path.read().splitlines()
+    assert 'framework = unittest' in config_file_path.read().splitlines()
 
     # Close project and test that config is empty
     plugin.main.projects.get_active_project = lambda: None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/widgets/configdialog.py 
new/spyder_unittest-0.3.1/spyder_unittest/widgets/configdialog.py
--- old/spyder_unittest-0.3.0/spyder_unittest/widgets/configdialog.py   
2017-09-28 14:06:34.000000000 +0200
+++ new/spyder_unittest-0.3.1/spyder_unittest/widgets/configdialog.py   
2018-06-15 23:07:26.000000000 +0200
@@ -25,7 +25,7 @@
 
 try:
     _ = get_translation("unittest", dirname="spyder_unittest")
-except KeyError as error:
+except KeyError:
     import gettext
     _ = gettext.gettext
 
@@ -157,6 +157,6 @@
 
 if __name__ == '__main__':
     app = QApplication([])
-    frameworks = ['nose', 'py.test', 'unittest']
+    frameworks = ['nose', 'pytest', 'unittest']
     config = Config(framework=None, wdir=getcwd())
     print(ask_for_config(frameworks, config))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/widgets/datatree.py 
new/spyder_unittest-0.3.1/spyder_unittest/widgets/datatree.py
--- old/spyder_unittest-0.3.0/spyder_unittest/widgets/datatree.py       
2018-02-16 15:01:43.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/widgets/datatree.py       
2018-06-15 23:07:26.000000000 +0200
@@ -23,7 +23,7 @@
 
 try:
     _ = get_translation("unittest", dirname="spyder_unittest")
-except KeyError as error:
+except KeyError:
     import gettext
     _ = gettext.gettext
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/widgets/tests/test_unittestgui.py 
new/spyder_unittest-0.3.1/spyder_unittest/widgets/tests/test_unittestgui.py
--- old/spyder_unittest-0.3.0/spyder_unittest/widgets/tests/test_unittestgui.py 
2018-02-02 14:40:04.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/widgets/tests/test_unittestgui.py 
2018-06-06 20:45:39.000000000 +0200
@@ -47,6 +47,14 @@
         widget.config = config
     assert widget.config == config
 
+def test_unittestwidget_config_with_unknown_framework_invalid(qtbot):
+    """Check that if the framework in the config is not known,
+    config_is_valid() returns False"""
+    widget = UnitTestWidget(None)
+    qtbot.addWidget(widget)
+    config = Config(wdir=os.getcwd(), framework='unknown framework')
+    assert widget.config_is_valid(config) == False
+
 def test_unittestwidget_process_finished_updates_results(qtbot):
     widget = UnitTestWidget(None)
     widget.testdatamodel = Mock()
@@ -142,7 +150,7 @@
     widget.pre_test_hook.call_count == 1
     mockRunner.start.call_count == 0
 
[email protected]('framework', ['py.test', 'nose'])
[email protected]('framework', ['pytest', 'nose'])
 def test_run_tests_and_display_results(qtbot, tmpdir, monkeypatch, framework):
     """Basic integration test."""
     os.chdir(tmpdir.strpath)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest/widgets/unittestgui.py 
new/spyder_unittest-0.3.1/spyder_unittest/widgets/unittestgui.py
--- old/spyder_unittest-0.3.0/spyder_unittest/widgets/unittestgui.py    
2018-02-16 15:01:43.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest/widgets/unittestgui.py    
2018-06-15 23:07:26.000000000 +0200
@@ -33,7 +33,7 @@
 # This is needed for testing this module as a stand alone script
 try:
     _ = get_translation("unittest", dirname="spyder_unittest")
-except KeyError as error:
+except KeyError:
     import gettext
     _ = gettext.gettext
 
@@ -204,7 +204,9 @@
         """
         if config is None:
             config = self.config
-        return (config and config.framework and osp.isdir(config.wdir))
+        return (config and config.framework
+                and config.framework in self.framework_registry.frameworks
+                and osp.isdir(config.wdir))
 
     def maybe_configure_and_start(self):
         """
@@ -375,7 +377,7 @@
 
     # set wdir to .../spyder_unittest
     wdir = osp.abspath(osp.join(osp.dirname(__file__), osp.pardir))
-    widget.config = Config('py.test', wdir)
+    widget.config = Config('pytest', wdir)
 
     # add wdir's parent to python path, so that `import spyder_unittest` works
     rootdir = osp.abspath(osp.join(wdir, osp.pardir))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest.egg-info/PKG-INFO 
new/spyder_unittest-0.3.1/spyder_unittest.egg-info/PKG-INFO
--- old/spyder_unittest-0.3.0/spyder_unittest.egg-info/PKG-INFO 2018-02-16 
15:51:22.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest.egg-info/PKG-INFO 2018-06-15 
23:12:31.000000000 +0200
@@ -1,20 +1,17 @@
 Metadata-Version: 1.1
 Name: spyder-unittest
-Version: 0.3.0
+Version: 0.3.1
 Summary: Plugin to run tests from within the Spyder IDE
 Home-page: https://github.com/spyder-ide/spyder-unittest
 Author: Spyder Project Contributors
 Author-email: UNKNOWN
 License: MIT
-Description-Content-Type: UNKNOWN
 Description: 
         This is a plugin for the Spyder IDE that integrates popular unit test
         frameworks. It allows you to run tests and view the results.
         
-        **Status:**
-        This is a work in progress. It is useable, but only the basic 
functionality
-        is implemented at the moment. The plugin currently supports the 
py.test and nose
-        testing frameworks.
+        The plugin supports the `unittest` framework in the Python
+        standard library and the `pytest` and `nose` testing frameworks.
         
 Keywords: Qt PyQt4 PyQt5 spyder plugins testing
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest.egg-info/SOURCES.txt 
new/spyder_unittest-0.3.1/spyder_unittest.egg-info/SOURCES.txt
--- old/spyder_unittest-0.3.0/spyder_unittest.egg-info/SOURCES.txt      
2018-02-16 15:51:22.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest.egg-info/SOURCES.txt      
2018-06-15 23:12:31.000000000 +0200
@@ -14,21 +14,21 @@
 spyder_unittest/backend/__init__.py
 spyder_unittest/backend/abbreviator.py
 spyder_unittest/backend/frameworkregistry.py
-spyder_unittest/backend/jsonstream.py
 spyder_unittest/backend/noserunner.py
 spyder_unittest/backend/pytestrunner.py
 spyder_unittest/backend/pytestworker.py
 spyder_unittest/backend/runnerbase.py
 spyder_unittest/backend/unittestrunner.py
+spyder_unittest/backend/zmqstream.py
 spyder_unittest/backend/tests/__init__.py
 spyder_unittest/backend/tests/test_abbreviator.py
 spyder_unittest/backend/tests/test_frameworkregistry.py
-spyder_unittest/backend/tests/test_jsonstream.py
 spyder_unittest/backend/tests/test_noserunner.py
 spyder_unittest/backend/tests/test_pytestrunner.py
 spyder_unittest/backend/tests/test_pytestworker.py
 spyder_unittest/backend/tests/test_runnerbase.py
 spyder_unittest/backend/tests/test_unittestrunner.py
+spyder_unittest/backend/tests/test_zmqstream.py
 spyder_unittest/tests/test_unittestplugin.py
 spyder_unittest/widgets/__init__.py
 spyder_unittest/widgets/configdialog.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spyder_unittest-0.3.0/spyder_unittest.egg-info/requires.txt 
new/spyder_unittest-0.3.1/spyder_unittest.egg-info/requires.txt
--- old/spyder_unittest-0.3.0/spyder_unittest.egg-info/requires.txt     
2018-02-16 15:51:22.000000000 +0100
+++ new/spyder_unittest-0.3.1/spyder_unittest.egg-info/requires.txt     
2018-06-15 23:12:31.000000000 +0200
@@ -1,2 +1,3 @@
 lxml
 spyder>=3
+pyzmq


Reply via email to