File: testcallable.py

package info (click to toggle)
python-param 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,048 kB
  • sloc: python: 17,980; makefile: 3
file content (10 lines) | stat: -rw-r--r-- 255 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import param
import pytest


def test_callable_validate():
    with pytest.raises(
        ValueError,
        match=r"Callable parameter 'c' only takes a callable object, not objects of <class 'str'>\."
    ):
        c = param.Callable('wrong')  # noqa