Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Bug Fixes

- Expand `~` in configured log file paths before opening the log.
- Stop truncating long string values in table output.

### Internal

Expand Down
1 change: 1 addition & 0 deletions litecli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ def format_output(self, title: Any, cur: Any, headers: Any, expanded: bool = Fal
output_kwargs = {
"dialect": "unix",
"disable_numparse": True,
"max_field_width": None,
"preserve_whitespace": True,
"preprocessors": (preprocessors.align_decimals,),
"style": self.output_style,
Expand Down
10 changes: 10 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ def stub_terminal_size(fallback=(80, 24)):
assert isinstance(lc.get_reserved_space(), int)


def test_format_output_does_not_truncate_long_strings():
long_value = "x" * 600
lc = LiteCli(liteclirc=default_config_file)

output = "\n".join(lc.format_output(None, [(long_value,)], ["value"]))

assert long_value in output
assert "..." not in output


@dbtest
def test_import_command(executor):
data_file = os.path.join(project_dir, "tests", "data", "import_data.csv")
Expand Down
Loading