Closed iblislin closed 7 years ago
this PR should fix #330
That output looks really nice. Good work! It might be worthwhile to add a test that ensures that sprint(show, ta)
(for ta
a TimeArray
) matches some expected output string.
simple test cases added.
good to go?
I think there should be a test along the lines of
@test sprint(show, something) == """
│ │ TestSoLong │ High │ Low │ Close │
├────────────┼────────────┼────────┼────────┼────────┤
│ 2000-01-03 │ 104.88 │ 112.5 │ 101.69 │ 111.94 │
│ 2000-01-04 │ 108.25 │ 110.62 │ 101.19 │ 102.5 │
│ 2000-01-05 │ 103.75 │ 110.56 │ 103.0 │ 104.0 │
│ 2000-01-06 │ 106.12 │ 107.0 │ 95.0 │ 95.0 │
│ 2000-01-07 │ 96.5 │ 101.0 │ 95.5 │ 99.5 │
│ 2000-01-10 │ 102.0 │ 102.25 │ 94.75 │ 97.75 │
│ 2000-01-11 │ 95.94 │ 99.38 │ 90.5 │ 92.75 │
│ 2000-01-12 │ 95.0 │ 95.5 │ 86.5 │ 87.19 │
│ 2000-01-13 │ 94.48 │ 98.75 │ 92.5 │ 96.75 │
│ 2000-01-14 │ 100.0 │ 102.25 │ 99.38 │ 100.44 │
│ 2000-01-18 │ 101.0 │ 106.0 │ 100.44 │ 103.94 │
│ 2000-01-19 │ 105.62 │ 108.75 │ 103.38 │ 106.56 │
"""
This ensures that the column alignment, rounding, values, and all of that is as expected. It's a more exact test than using contains
.
👌 done
DataFrames-like printing
make printing fit for
displaysize
remove
SHOWINT
implement paging. e.g.:
using MarketData; AAPL
Sample output: