Update TFS support to use the new run_process().

Review Request #12565 — Created Aug. 24, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-4.x

Reviewers

This updates the TFS wrapper classes to switch over from execute() to
run_process(). This gives us greater type safety across TFS, which is
important in keeping this client implementation maintainable.

All call sites now explicitly read either the byte stream or the Unicode
stream, depending on their needs. There's no longer a risk of expecting
one type and ending up with another.

Unit tests have been updated to spy on run_process_exec(), which gives
us a safe, checked way of returning data for tests that guarantees
proper interpreration by TFS.

Unit tests pass on Python 3.7-3.11.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Update TFS support to use the new run_process().
This updates the TFS wrapper classes to switch over from `execute()` to `run_process()`. This gives us greater type safety across TFS, which is important in keeping this client implementation maintainable. All call sites now explicitly read either the byte stream or the Unicode stream, depending on their needs. There's no longer a risk of expecting one type and ending up with another. Unit tests have been updated to spy on `run_process_exec()`, which gives us a safe, checked way of returning data for tests that guarantees proper interpreration by TFS.
008ef203f8ffe68c3e8ef62c928f3c221e24746c Christian Hammond
rbtools/clients/tfs.py
rbtools/clients/tests/test_tfs.py
Loading...