bluebird75 / luaunit

LuaUnit is a popular unit-testing framework for Lua, with an interface typical of xUnit libraries (Python unittest, Junit, NUnit, ...). It supports several output formats (Text, TAP, JUnit, ...) to be used directly or work with Continuous Integration platforms (Jenkins, Maven, ...).
Other
572 stars 137 forks source link

Flush output in the default verbosity #117

Closed kou closed 6 years ago

kou commented 6 years ago

In the default verbosity, LuaUnit outputs one character such as "." and "E". We can't know the one character progress until all tests are finished or the stdout internal buffer is fulled because the one characters are buffered in the stdout internal buffer.

We can the one character progress immediately by flushing the stdout internal buffer.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.0005%) to 99.632% when pulling 28e9cd27a07076d5c2fc91663202e25fe3d064fb on kou:flush into 54984082398836e7fe6f6e56780ac4525ed95057 on bluebird75:master.

bluebird75 commented 6 years ago

On which platform are you testing ? Because I just did the test on Windows 7, and the dots or E are printed as they progress.

I could imagine that linux has buffering though.

kou commented 6 years ago

Ah, sorry. I missed describing my environment. I'm using Debian GNU/Linux.

bluebird75 commented 6 years ago

Thanks for the contribution.

Out of curiosity, in what project are you using luaunit ?

kou commented 6 years ago

Thanks.

We're using LuaUnit in the following projects: