summaryrefslogtreecommitdiff
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 1.4.3HEADmasterJelmer Vernooij2023-02-101-1/+1
|
* (no commit message)Jelmer Vernooij2023-02-0211-85/+85
|
* Improve unittest callsJelmer Vernooij2023-02-013-26/+43
| | | | | | | reformatted python/subunit/tests/test_subunit_filter.py reformatted python/subunit/tests/test_test_results.py reformatted python/subunit/tests/test_test_protocol.py All done! 3 reformatted, 13 left unchanged
* Sort Python import definitions with isortJelmer Vernooij2023-01-3129-158/+93
|
* Drop compatibility wrappers for memoryview in older Python versionsJelmer Vernooij2023-01-283-35/+10
|
* Avoid use of extras - python3's hasattr is safeJelmer Vernooij2023-01-283-7/+3
|
* Release 1.4.2.1.4.2Jelmer Vernooij2022-11-171-1/+1
|
* Fix reading of test lists.fix-test-listsJelmer Vernooij2022-11-162-5/+14
|
* Release 1.4.11.4.1Jelmer Vernooij2022-11-051-1/+1
|
* Fix distcheck; include python files again.Jelmer Vernooij2022-11-051-1/+1
|
* Merge branch 'fix-filter-entrypoints' of https://github.com/mtreinish/subunitJelmer Vernooij2022-11-0516-4/+925
|\
| * Merge branch 'master' into fix-filter-entrypointsMatthew Treinish2021-06-158-8/+39
| |\
| * \ Merge branch 'master' into fix-filter-entrypointsMatthew Treinish2021-06-153-95/+5
| |\ \
| * \ \ Merge branch 'master' into fix-filter-entrypointsMatthew Treinish2021-06-105-17/+121
| |\ \ \
| * \ \ \ Merge branch 'master' into fix-filter-entrypointsMatthew Treinish2020-03-141-92/+117
| |\ \ \ \
| * | | | | Fix syntax issuesMatthew Treinish2019-12-159-31/+33
| | | | | |
| * | | | | Cleanup tests and buildsMatthew Treinish2019-12-151-4/+1
| | | | | |
| * | | | | Fix review commentsMatthew Treinish2019-12-151-1/+3
| | | | | |
| * | | | | Switch to setuptools entrypoint console scripts for filtersMatthew Treinish2019-12-1515-0/+931
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit switches from using scripts to setuptools entrypoint console scripts for the filter scripts. This should fix the issues for windows users trying to execute the scripts. To accomplish this the filter scripts are moved into the subunit package namespace and a callable to run the script is added to each module. Closes-Bug: #1322888
* | | | | | Explicitly invoke python3.Jelmer Vernooij2022-01-253-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | That's the only major version subunit supports, and some platforms still ship with /usr/bin/python==python2
* | | | | | Stop using io imports from testtoolsStephen Finucane2021-12-158-42/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer need to worry about Python 2, so we can just import directly from 'io'. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | | | | | Remove logic for Python < 3.6Stephen Finucane2021-12-157-91/+41
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | | | | | Handle different SyntaxError output in testtools 2.5.0Colin Watson2021-07-272-42/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testtools 2.5.0 only supports Python 3, and so switched from traceback2 to the standard library's traceback. However, this includes the fix for https://bugs.python.org/issue24695, and so doesn't produce a traceback header when there's no traceback, in particular for `SyntaxError` exceptions. Adjust the tests to tolerate this. See also https://github.com/zopefoundation/zope.testrunner/issues/125.
* | | | | | Sort Content-Type parameters when writing detailsColin Watson2021-07-272-34/+10
| | | | | | | | | | | | | | | | | | | | | | | | This simplifies tests by making the output more reproducible.
* | | | | | Import six from the right placeColin Watson2021-07-271-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | We shouldn't rely on testtools.testcase importing it.
* | | | | Merge branch 'master' into testtools.compatMatthew Treinish2021-06-151-4/+4
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Merge branch 'master' into python310Matthew Treinish2021-06-152-91/+1
| |\ \ \ \
| * | | | | python: Mark rawstrings as suchStephen Finucane2021-04-201-4/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolves the following warnings in Python 3.6+: DeprecationWarning: invalid escape sequence \! match = re.match("Bail out\!(?:\s*(.*))?\n", line) Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | | | | Merge branch 'master' into testtools.compatMatthew Treinish2021-06-152-91/+1
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Revert "Merge pull request #17 from mtreinish/timestamp-output"Matthew Treinish2021-06-152-91/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1dafb884e47f5fc26232672b01c2a9574577e7be, reversing changes made to 7583ce28db20a0b2ad229a69175949e5a30586fe. This PR had completely broken tests, while I think the feature works it's blocking CI and preventing any merges. I'll rework the PR and resubmit after I get the unittests working.
* | | | fix trailing commaMatthieu Huin2021-06-151-1/+1
| | | |
* | | | Fix imports from testtools.compatMatthieu Huin2021-06-158-8/+39
|/ / / | | | | | | | | | | | | | | | The future release of testtools will drop StringIO and BytesIO. Try to import them from testtools.compat, or from the io module if they're not available.
* | | Merge pull request #17 from mtreinish/timestamp-outputJelmer Vernooij2021-03-092-1/+91
|\ \ \ | | | | | | | | Add options to output filter to set timestamps
| * | | Fix timestamp test copy paste errorMatthew Treinish2020-03-141-1/+1
| | | |
| * | | Add options to output filter to set timestampsMatthew Treinish2020-03-142-1/+91
| | |/ | |/| | | | | | | | | | | | | This commit adds 2 new options to subunit-output, --start-time and --stop-time, to specify a timestamp for the start and end of a test in the output.
* | | add missing referenceThomas Grainger2021-03-041-0/+2
| | |
* | | Merge pull request #32 from mcepl/kill_unittest2Jelmer Vernooij2021-03-041-15/+27
|\ \ \ | | | | | | | | Remove dependency on unittest2
| * | | Unittest from testtools doesn't work, use the one from stdlib.Matěj Cepl2020-06-051-3/+3
| | | |
| * | | Acommodate review requests.Matěj Cepl2020-06-051-5/+5
| | | |
| * | | Remove dependency on unittest2Matěj Cepl2018-09-131-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | It is questionable whether it is actually the right way how to do it. I would need a review from somebody who actually understands API and the protocol, whether I am not unintentionally changing API.
* | | | Release 1.4.0.1.4.0Jelmer Vernooij2020-03-141-1/+1
| |/ / |/| | | | | | | | Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
* | | Correctly handle py3 RawIOBase read()Stephen Finucane2020-03-141-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python3's RawIOBase guarantees only one syscall per read() requiring a loop to accumulate the desired number of bytes or actually reach EOF. TextIOBase.read does issue multiple syscalls (it must to correctly decode partial unicode characters), but subunit unwraps that to get a binary stream, and at least some of the time the layering is io.TextIOBase(_io.FileIO), where _io.FileIO is a RawIOBase subclass rather than BufferedIOBase. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Partial-bug: #1813147
* | | trivial: Fix indentationStephen Finucane2020-03-101-88/+104
| |/ |/| | | | | Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Check written bytes are not None before summing them to offsetFederico Ressi2019-09-271-0/+2
| | | | | | | | | | | | | | | | Because purely written streams could return None instead of written bytes, we cannot sum them to offset integer. On such case let assume data has been written all at once. This fixes LaunchPad [#1845631](https://bugs.launchpad.net/subunit/+bug/1845631)
* | Fix file open for python3Quique Llorente2018-12-261-2/+2
|/ | | | | At python3 there is no "file" the "open" function has to be use to open a file.
* Rely on file.__iter__ rather than file.readlines.Jelmer Vernooij2018-06-161-2/+2
|
* Add support for parsing in a regex to apply to test ids.Jelmer Vernooij2018-03-242-1/+32
| | | | Bug: pad.lv/1758522
* Fixup NEWS and versions for recent workRobert Collins2018-01-251-1/+1
|
* Check for ValueError in write only check in _unwrap_text()Matthew Treinish2017-09-252-1/+44
| | | | | | | | | | | | | | | | In the _unwrap_text() function it checks by trying to read or write to the stream to see if it's wrapped or not and return the buffer. The check there first tries to read and if an exception of the proper type is raised it will assume it was opened in write mode and proceed to check for a buffer by writing to the stram. However this check is missing an exception to check for. If a FileIO object is passed in on Python 2.7 (which can be the case sometimes for sys.stdout, although I haven't figured out under which circumstances) then a ValueError will be raised. [1] To enable using _unwrap_text() when a FileIO object is used this commit adds a ValueError to the list of exception types to handle this case. [1] https://github.com/python/cpython/blob/2.7/Modules/_io/fileio.c#L431
* Fallback to reading one-byte-at-a-time on Windows (#22)Claudiu Belu2017-03-021-0/+5
| | | | select.select does not work on file descriptors on Windows, causing subunit to fail.