• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rpatil524 / txtai / 22877032801 / 1
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 10 Mar 2026 04:39PM UTC
Files 250
Run time 6s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Mar 2026 06:39PM UTC coverage: 100.0%. Remained the same
22877032801.1

push

github

web-flow
Fix translation chunk concatenation when showmodels is enabled (#1052)

* Fix translation chunk concatenation when showmodels is enabled

When translating long text that gets split into multiple chunks by the
tokenizer, the translate() method combines results from the same source
text segment. With showmodels=True, each result is a tuple (path, text).
Using += to combine tuples produces (path, text1, path, text2) instead
of the expected (path, text1+text2). This causes a ValueError when the
caller unpacks with "model, op = outputs[y]" since there are too many
values.

Fix by explicitly concatenating only the text portion of the tuple when
showmodels is enabled.

Signed-off-by: JiangNan <1394485448@qq.com>

* Add unit test for showmodels with chunked translation

Adds testLongTranslationWithShowmodels to verify that when text is long
enough to be chunked by the tokenizer, the showmodels result is still a
proper 3-tuple (translation, language, model) and not a malformed tuple
from incorrect concatenation.

Signed-off-by: JiangNan <1394485448@qq.com>

* Shorten test method name to fix build

Rename testLongTranslationWithShowmodels -> testShowmodelsChunked
as the previous name was too long for the test runner.

Signed-off-by: JiangNan <1394485448@qq.com>

---------

Signed-off-by: JiangNan <1394485448@qq.com>

9591 of 9591 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 22877032801.1
  • Tree
  • List 250
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22877032801
  • 79908eee on github
  • Prev Job for on master (#22691694681.1)
  • Next Job for on master (#23091479084.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc