More robust template
TST Use assert_almost_equal in test_symmetry
Fix unusual cases for tests