[pci]redesign test_functions for optimization.py