New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report is misaligned on 3digit tests #712

Closed
vspinu opened this Issue Jan 31, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@vspinu
Contributor

vspinu commented Jan 31, 2018

A tiny issue. Bars are misaligned when more than 100 tests per context are involved:

Testing lubridate
✔ | OK F W S | Context
✔ | 144       | Accessors [0.4 s]
✔ |  2       | Test days_in_month
✔ | 13       | AM/PM
✔ | 24       | Dates [0.1 s]
✔ | 39       | Daylight savings times [0.1 s]
✔ | 12       | Decimal_date
✔ | 10       | Difftimes
✔ | 74       | Durations [0.2 s]
✔ |  1       | Guessing format
✔ | 16       | Instants [0.1 s]
✔ | 199       | Intervals [1.7 s]
✔ |  4       | Namespace [2.4 s]
✔ | 91       | Addition operations [0.4 s]
✔ | 17       | Comparisons operations
✔ | 75       | Division operators [0.4 s]
✔ | 32       | Integer division operations [0.2 s]
✔ | 36       | Modulo operations [0.2 s]
✔ | 12       | Multiplication operations
✔ | 44       | Subtraction operations [0.2 s]
✔ | 372       | Parsing [1.7 s]
✔ | 157       | Periods [0.8 s]
✔ | 32       | POSIXt [0.2 s]
✔ |  2       | Pretty formatting of dates
✔ |  5       | Rollback
✔ | 238       | Rounding [0.9 s]
✔ | 404       | Settors [1.2 s]
✔ | 69       | Stamp [0.7 s]
✔ | 38       | Timespans [0.3 s]
✔ | 27       | Time zones [0.1 s]
✔ | 250       | Updating dates [0.7 s]
✔ | 12       | Utilities
@jimhester

This comment has been minimized.

Member

jimhester commented Mar 29, 2018

Unfortunately we cannot know a priori how many columns are needed to display the results. We could expand this to 3 digits, but you would still get the same problem if you had over 999 tests. The same issue also occurs if you have more than 99 warnings or skips for a given context (admittedly less rare).

The simple solution would be to use 3 digits for tests and 2 for everything else, which should handle the majority of cases.

@jimhester jimhester added the bug label Mar 29, 2018

jimhester added a commit to jimhester/testthat that referenced this issue Mar 30, 2018

@jimhester jimhester added the wip label Mar 30, 2018

jimhester added a commit to jimhester/testthat that referenced this issue Apr 4, 2018

jimhester added a commit that referenced this issue Apr 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment