Skip to content

Commit f551252

Browse files
author
y-p
committed
TST: add test for config.is_one_of_factory
1 parent 61ed771 commit f551252

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/test_config.py

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ def test_api(self):
3939
self.assertTrue(hasattr(pd, 'reset_option'))
4040
self.assertTrue(hasattr(pd, 'describe_option'))
4141

42+
def test_is_one_of_factory(self):
43+
v = self.cf.is_one_of_factory([type(None),int])
44+
45+
v(12)
46+
v(None)
47+
self.assertRaises(ValueError,v,1.1)
48+
4249
def test_register_option(self):
4350
self.cf.register_option('a', 1, 'doc')
4451

0 commit comments

Comments
 (0)