DataDesigner/packages/data-designer/tests/cli/utils
Johnny Greco 03b3d6c726
chore: address Andre's feedback on --save-results and CLI preview (#335)
* fix: suppress stdout when saving report and sample records to file

Console(record=True) still prints to stdout by default. Use
file=io.StringIO() to redirect output so save-path calls only
write to disk.

* refactor: --save-results skips terminal display

When --save-results is used, records and the analysis report are no
longer printed to the terminal. Extracted save logic into a dedicated
_save_preview_results method and updated option help text accordingly.

* feat: wrap-around navigation in sample records browser

Prev/next buttons and arrow keys now cycle back to the beginning/end
instead of clamping at boundaries.

* test: reuse record_series fixture in visualization tests

* feat: thread --theme through to sample records pager

The pager shell was hardcoded dark, so --theme light produced
light records inside a dark frame. Extract CSS variables into
dark/light constants and pass the theme from the controller.

* fix: cap terminal display width at display_width

The module-level Console() had no width limit, so tables with
expand=True stretched to the full terminal width. Cap terminal
output at min(terminal_width, display_width) and thread the
display_width parameter through the controller's display methods.

* docs: update --display-width and --theme help text

Remove "Only applies when --save-results is used" from
--display-width since it now also affects terminal output.

* fix: update generation controller tests to match display_width and save_results behavior
2026-02-18 20:17:03 -05:00
..
test_config_loader.py chore: Improve CLI startup with lazy heavy import cleanup (#330) 2026-02-18 16:24:15 -05:00
test_sample_records_pager.py chore: address Andre's feedback on --save-results and CLI preview (#335) 2026-02-18 20:17:03 -05:00