diff --git a/requirements-tests.txt b/requirements-tests.txt index c3abd4e80..a7908a384 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,7 +1,8 @@ pytest==7.1.2 +pytest-mock coverage coveralls bokeh nbval pytest-cov -pygments \ No newline at end of file +pygments diff --git a/tests/test_tables.py b/tests/test_tables.py index c36bd2dd8..de740e5db 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -572,6 +572,12 @@ def test_join(table, table2): z | 1 | 10 | 10 """) +def test_set_format_with_no_format_column(mocker, table): + MockNumberFormatter = mocker.NonCallableMock(spec=NumberFormatter) + del MockNumberFormatter.format_column + with pytest.raises(Exception): + table.set_format('count', MockNumberFormatter) + def test_join_html(table, table2): """Test that join doesn't crash with formatting.""" t = table