summaryrefslogtreecommitdiff
path: root/testtools/testresult
Commit message (Collapse)AuthorAgeFilesLines
* Wrap content-type params in a dictionaryMatthew Treinish2023-03-101-1/+1
|
* Replace deprecated `cgi` module usage with `email`Matthew Treinish2023-02-061-2/+5
| | | | | | | | | | | In Python 3.11 the standard library `cgi` module was deprecated with a planned removal set for Python 3.13. In preparation for that removal, this commit removes the usage of this deprecated module and replaces it with the still supported standard library `email` module which is what the documentation points to as an alternative for how `cgi` was previously used. This should still be compatible with all the supported Python versions but will be more future proof and not emit any deprecation warnings with Python 3.11 anymore.
* Upgrade Python syntax with pyupgrade --py36-plusHugo van Kemenade2022-02-071-11/+11
|
* Remove mimeparse dependencyStephen Finucane2021-02-251-7/+19
| | | | | | We can do this ourselves quite easily. Signed-off-by: Stephen Finucane <stephen@that.guru>
* trivial: Cleanup importsStephen Finucane2021-02-251-3/+4
| | | | | | | This is kept separately from the reintroduction of 'try_imports' to keep that patch reasonable. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Re-introduce 'try_imports'Stephen Finucane2021-02-251-1/+1
| | | | | | | | | | | | There are few if any people still (knowingly) using the 'extras' lib. OpenStack users have their own implementation (sigh) in 'oslo.utils' and everyone else is getting by with try-except statements. Reintroduce this utility to 'testtools.helpers', allowing us to eventually drop the dependency on extras. Note however that we can't actually do this yet since 'fixtures' has an implicit dependency on 'extras' through 'testtools', and we break that by removing it here. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Remove use of 'try_imports'Stephen Finucane2021-02-251-3/+2
| | | | | | | | This was being used in places to handle differences between Python 2 and Python 3. Since we only care about the latter now, the utility can be removed. Signed-off-by: Stephen Finucane <stephen@that.guru>
* Remove use of 'safe_hasattr'Stephen Finucane2021-02-251-4/+4
| | | | | | | | | | | | | This was used to workaround some issues with 'hasattr' on Python 2.x versions, discussed in the source for extras (where this utility was moved to make it more useful to others) [1] and elsewhere on the internet [2]. These issues are no longer present on the versions of Python we now support (Python 3.6+) so this is no longer necessary. [1] https://github.com/testing-cabal/extras/blob/1.0.0/extras/__init__.py#L101-L108 [2] https://hynek.me/articles/hasattr/ Signed-off-by: Stephen Finucane <stephen@that.guru>
* Upgrade Python syntax with pyupgrade --py3-plusHugo2020-01-182-69/+69
|
* Remove redundant Python 2 compatability codeHugo2020-01-181-17/+3
|
* Upgrade Python syntax with pyupgradeHugo2020-01-181-13/+13
|
* Spelling fixes (#261)Ville Skyttä2017-05-291-1/+1
|
* Add ResourcedToStreamDecorator test result decorator for testresources ↵Free Ekanayaka2017-04-113-6/+70
| | | | | integration (#243) This new decorator implements the TestResult protocol extension supported by test resources. For example, tt makes it possible to easily have resource-related events streamed to subunit.
* Don't add file details without content (#252)Thomas Hervé2017-02-081-1/+1
| | | | | In the test record API, skip adding file details to the record if there are not bytes. This reduces that amount of data kept when there is none.
* Revert usage of pyrsistentThomas Herve2016-03-041-29/+34
| | | | | | | Remove the dependency on pyrsistent and make the _TestRecord class a simple obkect, as it has a pretty big performance hit. Closes #219
* Support TestResults without stop/shouldStopJonathan Lange2016-02-042-14/+70
| | | | | | Twisted's IReporter contract doesn't specify `stop` or `shouldStop`. With this change, we can still meaningfully call `stop()` after adapting with `ExtendedToOriginalDecorator`.
* Fix typo: flexabilitytypo-flexabilityLeo Arias2016-01-271-1/+1
|
* Hide TestRecord and StreamToTestRecordJonathan Lange2015-11-121-20/+20
| | | | | While they are probably OK to be exposed, let's keep this patch minimal & not news-worthy
* Old-fashioned set syntaxJonathan Lange2015-11-091-2/+2
|
* Abstract text_or_bytesJonathan Lange2015-11-091-5/+5
|
* Change PRecord to PClassJonathan Lange2015-11-091-2/+2
| | | | We don't want to accidentally iterate on TestRecord, say.
* Move test_dict_to_case near StreamToDictJonathan Lange2015-11-091-15/+15
|
* Don't use StreamToDict internallyJonathan Lange2015-11-091-9/+9
|
* _streamer -> _hookJonathan Lange2015-11-091-8/+8
|
* StreamSummary with composition, not inheritanceJonathan Lange2015-11-091-2/+12
|
* Extract StreamToTestRecord base classJonathan Lange2015-11-091-22/+68
|
* Move _make_content_type closer to where it is usedJonathan Lange2015-11-091-21/+21
|
* Put to_test_case logic on TestRecordJonathan Lange2015-11-091-8/+25
|
* Make _status_map persistent.Jonathan Lange2015-11-091-2/+2
| | | | No need to ever change it.
* Move test_dict_to_case closer to test_dict definitionJonathan Lange2015-11-091-27/+27
|
* Remove temporary variable 'case'Jonathan Lange2015-11-091-8/+7
|
* Extract got_fileJonathan Lange2015-11-091-8/+19
|
* Extract got_timestamp functionJonathan Lange2015-11-091-6/+10
|
* Move creation logic to TestRecord itselfJonathan Lange2015-11-091-10/+11
|
* Actually use TestRecord internallyJonathan Lange2015-11-091-25/+59
|
* Extract methods for making and updating recordJonathan Lange2015-11-091-13/+25
|
* Extract _make_content_typeJonathan Lange2015-11-091-14/+22
|
* Use `case` consistently, over `_inprogress[key]`Jonathan Lange2015-11-091-5/+13
|
* Use name for interim statesJonathan Lange2015-11-091-1/+1
|
* Aspirational documentationJonathan Lange2015-11-091-0/+66
|
* Update PlaceHolder indentationJonathan Lange2015-11-061-3/+3
|
* Restore & deprecate domapJonathan Lange2015-11-061-6/+19
| | | | | | * Private name for `_strict_map` * Use `map` signature to `_strict_map` * Add alias `domap` with deprecation warning
* Spell out `f` and `xs`Jonathan Lange2015-11-031-2/+2
|
* Drop `__metaclass__` declarationJonathan Lange2015-11-021-1/+0
|
* Document confusing `domap`Jonathan Lange2015-11-021-6/+7
|
* Remove duplicate implementation of methodJonathan Lange2015-11-021-3/+0
|
* Allow event_log to be passed to result doublesJonathan Lange2015-11-021-8/+12
|
* Fix lint in testresult.realJonathan Lange2015-11-021-56/+73
|
* Lint clear-upJonathan Lange2015-11-021-6/+7
|
* Fix pypy3 tests by using ceil when reporting duration.Robert Collins2015-03-111-4/+10
| | | | | | | | During reporting in ``TextTestResult`` now always uses ``ceil`` rather than depending on the undefined rounding behaviour in string formatting. (Robert Collins) Change-Id: I72e11ccd1c41e9dbc65358aba5c1ffdc2d96eaf6