🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

python-subunit

Package Overview
Dependencies
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-subunit - pypi Package Compare versions

Comparing version
1.2.0
to
1.3.0
filters/subunit2disk

Sorry, the diff of this file is not supported yet

+21
-0

@@ -8,5 +8,26 @@ ---------------------

1.3.0
-----
IMPROVEMENTS
~~~~~~~~~~~~
* Add a --rename flag to subunit-filter.
(Jelmer Vernooij, #1758522)
BUGFIXES
~~~~~~~~
* Fix make_stream_binary with FileIO object inputs.
(Matthew Treinish)
* Fix v2 run() on windows platforms.
(Claudiu Belu)
1.2.0
-----
IMPROVEMENTS
~~~~~~~~~~~~
* Fixed handling of incomplete writes with eventlet on Python3.

@@ -13,0 +34,0 @@ (Victor Stinner)

+5
-3

@@ -1,4 +0,4 @@

Metadata-Version: 1.1
Metadata-Version: 2.1
Name: python-subunit
Version: 1.2.0
Version: 1.3.0
Summary: Python implementation of subunit test streaming protocol

@@ -489,4 +489,4 @@ Home-page: http://launchpad.net/subunit

* Push a tagged commit.
git push -t origin master:master
Keywords: python test streaming

@@ -498,1 +498,3 @@ Platform: UNKNOWN

Classifier: Topic :: Software Development :: Testing
Provides-Extra: test
Provides-Extra: docs

@@ -1,4 +0,4 @@

Metadata-Version: 1.1
Metadata-Version: 2.1
Name: python-subunit
Version: 1.2.0
Version: 1.3.0
Summary: Python implementation of subunit test streaming protocol

@@ -489,4 +489,4 @@ Home-page: http://launchpad.net/subunit

* Push a tagged commit.
git push -t origin master:master
Keywords: python test streaming

@@ -498,1 +498,3 @@ Platform: UNKNOWN

Classifier: Topic :: Software Development :: Testing
Provides-Extra: test
Provides-Extra: docs

@@ -15,2 +15,3 @@ MANIFEST.in

filters/subunit2csv
filters/subunit2disk
filters/subunit2gtk

@@ -17,0 +18,0 @@ filters/subunit2junitxml

@@ -156,3 +156,3 @@ #

__version__ = (1, 2, 0, 'final', 0)
__version__ = (1, 3, 0, 'final', 0)

@@ -1291,2 +1291,3 @@ PROGRESS_SET = 0

"""Unwrap stream if it is a text stream to get the original buffer."""
exceptions = (_UnsupportedOperation, IOError)
if sys.version_info > (3, 0):

@@ -1296,2 +1297,3 @@ unicode_type = str

unicode_type = unicode
exceptions += (ValueError,)
try:

@@ -1301,3 +1303,3 @@ # Read streams

return stream.buffer
except (_UnsupportedOperation, IOError):
except exceptions:
# Cannot read from the stream: try via writes

@@ -1304,0 +1306,0 @@ try:

@@ -28,2 +28,3 @@ #

from testtools import StreamResult
from testtools.testcase import PlaceHolder

@@ -454,3 +455,4 @@ from subunit import iso8601

filter_success=True, filter_skip=False, filter_xfail=False,
filter_predicate=None, fixup_expected_failures=None):
filter_predicate=None, fixup_expected_failures=None,
rename=None):
"""Create a FilterResult object filtering to result.

@@ -472,2 +474,3 @@

failing.
:param rename: Optional function to rename test ids
"""

@@ -506,4 +509,6 @@ predicates = []

self._fixup_expected_failures = fixup_expected_failures
self._rename_fn = rename
def addError(self, test, err=None, details=None):
test = self._apply_renames(test)
if self._failure_expected(test):

@@ -516,2 +521,3 @@ self.addExpectedFailure(test, err=err, details=details)

def addFailure(self, test, err=None, details=None):
test = self._apply_renames(test)
if self._failure_expected(test):

@@ -524,2 +530,3 @@ self.addExpectedFailure(test, err=err, details=details)

def addSuccess(self, test, details=None):
test = self._apply_renames(test)
if self._failure_expected(test):

@@ -533,3 +540,11 @@ self.addUnexpectedSuccess(test, details=details)

def _apply_renames(self, test):
if self._rename_fn is None:
return test
new_id = self._rename_fn(test.id())
# TODO(jelmer): Isn't there a cleaner way of doing this?
setattr(test, "id", lambda: new_id)
return test
class TestIdPrintingResult(testtools.TestResult):

@@ -536,0 +551,0 @@ """Print test ids to a stream.

@@ -283,2 +283,18 @@ #

def test_renames(self):
def rename(name):
return name + " - renamed"
result = ExtendedTestResult()
result_filter = TestResultFilter(
result, filter_success=False, rename=rename)
input_stream = _b(
"test: foo\n"
"successful: foo\n")
self.run_tests(result_filter, input_stream)
self.assertEquals(
[('startTest', 'foo - renamed'),
('addSuccess', 'foo - renamed'),
('stopTest', 'foo - renamed')],
[(ev[0], ev[1].id()) for ev in result._events])
if sys.version_info < (2, 7):

@@ -285,0 +301,0 @@ # These tests require Python >=2.7.

@@ -18,4 +18,7 @@ #

import datetime
import io
import unittest2 as unittest
import os
import sys
import tempfile

@@ -56,2 +59,40 @@ from testtools import PlaceHolder, skipIf, TestCase, TestResult

class TestHelpers(TestCase):
def test__unwrap_text_file_read_mode(self):
fd, file_path = tempfile.mkstemp()
self.addCleanup(os.remove, file_path)
fake_file = os.fdopen(fd, 'r')
if sys.version_info > (3, 0):
self.assertEqual(fake_file.buffer,
subunit._unwrap_text(fake_file))
else:
self.assertEqual(fake_file, subunit._unwrap_text(fake_file))
def test__unwrap_text_file_write_mode(self):
fd, file_path = tempfile.mkstemp()
self.addCleanup(os.remove, file_path)
fake_file = os.fdopen(fd, 'w')
if sys.version_info > (3, 0):
self.assertEqual(fake_file.buffer,
subunit._unwrap_text(fake_file))
else:
self.assertEqual(fake_file, subunit._unwrap_text(fake_file))
def test__unwrap_text_fileIO_read_mode(self):
fd, file_path = tempfile.mkstemp()
self.addCleanup(os.remove, file_path)
fake_file = io.FileIO(file_path, 'r')
self.assertEqual(fake_file, subunit._unwrap_text(fake_file))
def test__unwrap_text_fileIO_write_mode(self):
fd, file_path = tempfile.mkstemp()
self.addCleanup(os.remove, file_path)
fake_file = io.FileIO(file_path, 'w')
self.assertEqual(fake_file, subunit._unwrap_text(fake_file))
def test__unwrap_text_BytesIO(self):
fake_stream = io.BytesIO()
self.assertEqual(fake_stream, subunit._unwrap_text(fake_stream))
class TestTestImports(unittest.TestCase):

@@ -58,0 +99,0 @@

@@ -312,2 +312,7 @@ #

while len(buffered[-1]):
# Note: Windows does not support passing a file descriptor to
# select.select. fallback to one-byte-at-a-time.
if sys.platform == 'win32':
break
try:

@@ -314,0 +319,0 @@ self.source.fileno()

@@ -481,2 +481,2 @@

* Push a tagged commit.
git push -t origin master:master

@@ -5,5 +5,4 @@ [bdist_wheel]

[egg_info]
tag_svn_revision = 0
tag_build =
tag_date = 0
tag_build =

@@ -76,2 +76,3 @@ #!/usr/bin/env python

'filters/subunit2csv',
'filters/subunit2disk',
'filters/subunit2gtk',

@@ -78,0 +79,0 @@ 'filters/subunit2junitxml',

Sorry, the diff of this file is not supported yet