Skip to content

Commit

Permalink
add simple _print_opts tests
Browse files Browse the repository at this point in the history
  • Loading branch information
epistoteles committed Jun 18, 2024
1 parent 053d44d commit 2eb72a7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test__print_opts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from tensorhue._print_opts import set_printoptions, PRINT_OPTS
from tensorhue.colors import ColorScheme


def test_default_print_opts():
assert PRINT_OPTS.threshold > 100
assert isinstance(PRINT_OPTS.colorscheme, ColorScheme)


def test_set_printopts():
set_printoptions(threshold=1234)
assert PRINT_OPTS.threshold == 1234
set_printoptions(edgeitems=4)
assert PRINT_OPTS.edgeitems == 4
assert PRINT_OPTS.threshold == 1234

0 comments on commit 2eb72a7

Please sign in to comment.