Do not dispatch on argument types of Algorithm
the _pop_*
methods in Algorithm.__new__
dispatch on value types, but we know what to expect from the Configurable
and the transforms.
The following discussion from !198 (merged) should be addressed:
-
@rmatev started a discussion: (+1 comment) 🤔 indeed. Can we easily improve to have this extra test passingdiff --git a/PyConf/python/PyConf/tests/test_tool.py b/PyConf/python/PyConf/tests/test_tool.py index aadd6319..2af767aa 100644 --- a/PyConf/python/PyConf/tests/test_tool.py +++ b/PyConf/python/PyConf/tests/test_tool.py @@ -22,6 +22,9 @@ def test_init(): Tool(MyTool, NotAProp=1) assert re.search(r'NotAProp.*not propert.* of.*MyTool', str(e)) + with pytest.raises(ConfigurationError) as e: + Tool(MyTool, Int=Tool(MyTool)) + with pytest.raises(ConfigurationError) as e: Tool(FloatTool) assert re.search(r'please provide all inputs.*Input.*', str(e))
Also add a test for passing wrong valued properties