Skip to content

Commit 4530544

Browse files
authored
Remove the Transcript Testing feature (#1583)
Transcript Testing was always an extremely brittle regression testing framework. We encourage all cmd2 users to use pytest for unit and integration tests and Robot Framework for acceptance tests. These frameworks are much more robust and you can use them to write tests that are less brittle.
1 parent f41cd5c commit 4530544

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+55
-1292
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ cmd2/rich_utils.py @kmvanbrunt
4444
cmd2/string_utils.py @kmvanbrunt
4545
cmd2/styles.py @tleonhardt @kmvanbrunt
4646
cmd2/terminal_utils.py @kmvanbrunt
47-
cmd2/transcript.py @tleonhardt
4847
cmd2/utils.py @tleonhardt @kmvanbrunt
4948

5049
# Documentation

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ repos:
66
- id: check-merge-conflict
77
- id: check-toml
88
- id: end-of-file-fixer
9-
exclude: ^examples/transcripts/
109
- id: trailing-whitespace
11-
exclude: ^examples/transcripts/
1210

1311
- repo: https://github.com/astral-sh/ruff-pre-commit
1412
rev: "v0.15.2"

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ prompt is displayed.
2222
each platform and provided utility functions related to `readline`
2323
- Added a dependency on `prompt-toolkit` and a new `cmd2.pt_utils` module with supporting
2424
utilities
25+
- Removed **Transcript Testing** feature set along with the `history -t` option for generating
26+
transcript files and the `cmd2.transcript` module
27+
- This was an extremely brittle regression testing framework which should never have been
28+
built into cmd2
29+
- We recommend using [pytest](https://docs.pytest.org/) for unit and integration tests and
30+
[Robot Framework](https://robotframework.org/) for acceptance tests. Both of these
31+
frameworks can be used to create tests which are far more reliable and less brittle.
2532
- Async specific: `prompt-toolkit` starts its own `asyncio` event loop in every `cmd2`
2633
application
2734
- Removed `cmd2.Cmd.terminal_lock` as it is no longer required to support things like

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ command line argument parsing and execution of cmd2 scripting.
7777
- Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
7878
- Powerful and flexible built-in Python scripting of your application using the `run_pyscript`
7979
command
80-
- Transcripts for use with built-in regression can be automatically generated from `history -t` or
81-
`run_script -t`
8280

8381
## Installation
8482

cmd2/cmd2.py

Lines changed: 23 additions & 240 deletions
Large diffs are not rendered by default.

cmd2/transcript.py

Lines changed: 0 additions & 223 deletions
This file was deleted.

docs/api/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ incremented according to the [Semantic Version Specification](https://semver.org
3131
- [cmd2.string_utils](./string_utils.md) - string utility functions
3232
- [cmd2.styles](./styles.md) - cmd2-specific Rich styles and a StrEnum of their corresponding names
3333
- [cmd2.terminal_utils](./terminal_utils.md) - support for terminal control escape sequences
34-
- [cmd2.transcript](./transcript.md) - functions and classes for running and validating transcripts
3534
- [cmd2.utils](./utils.md) - various utility classes and functions

docs/api/transcript.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/examples/alternate_event_loops.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ integrate with any specific event loop is beyond the scope of this documentation
7878
running in this fashion comes with several disadvantages, including:
7979

8080
- Requires the developer to write more code
81-
- Does not support transcript testing
8281
- Does not allow commands at invocation via command-line arguments

docs/examples/getting_started.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ The last thing you'll notice is that we used the `self.poutput()` method to disp
152152

153153
1. Allows the user to redirect output to a text file or pipe it to a shell process
154154
1. Gracefully handles `BrokenPipeError` exceptions for redirected output
155-
1. Makes the output show up in a [transcript](../features/transcripts.md)
156155
1. Honors the setting to [strip embedded ANSI sequences](../features/settings.md#allow_style)
157156
(typically used for background and foreground colors)
158157

0 commit comments

Comments
 (0)