Skip to content

Commit

Permalink
tests: fix some tracking tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mah neh committed Oct 1, 2024
1 parent 769db03 commit 0c04af1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion keras_tuner/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@


from keras_tuner import utils
import pytest


def test_to_list_with_many_return_list():
many = [(1, 2, 3), "abc", 1, 1.0, "a", {"a": "b"}]
many = [(1, 2, 3), 1, 1.0]
for item in many:
result = utils.to_list(item)
assert isinstance(result, list)
Expand All @@ -32,6 +33,11 @@ def test_to_list_with_many_return_list():
assert result == [1.0]


def test_to_list_throws():
with pytest.raises(TypeError):
utils.to_list("123")


def test_try_clear_without_ipython():
is_notebook = utils.IS_NOTEBOOK
utils.IS_NOTEBOOK = False
Expand Down

0 comments on commit 0c04af1

Please sign in to comment.