From 44a31f1a30df9a9e3b2f021b2e7ebab92635cdf0 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 6 Mar 2019 18:58:30 +0000 Subject: [PATCH] fix valuesview not support index --- tests/test_mcnp.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_mcnp.py b/tests/test_mcnp.py index 4bb45fb768..6c20f5e3ce 100644 --- a/tests/test_mcnp.py +++ b/tests/test_mcnp.py @@ -551,8 +551,9 @@ def test_read_mcnp(): list(read_materials[2]._mats.keys())[0].comp.keys()) for i in range(2): assert_almost_equal( - list(expected_multimaterial._mats.keys())[0].comp.values()[i], - list(read_materials[2]._mats.keys())[0].comp.values()[i]) + list(list(expected_multimaterial._mats.keys()) + [0].comp.values())[i], + list(list(read_materials[2]._mats.keys())[0].comp.values())[i]) assert_almost_equal( list(expected_multimaterial._mats.keys())[0].mass, list(read_materials[2]._mats.keys())[0].mass) @@ -570,8 +571,9 @@ def test_read_mcnp(): list(read_materials[2]._mats.keys())[1].comp.keys()) for i in range(2): assert_almost_equal( - list(expected_multimaterial._mats.keys())[1].comp.values()[i], - list(read_materials[2]._mats.keys())[1].comp.values()[i]) + list(list(expected_multimaterial._mats.keys()) + [1].comp.values())[i], + list(list(read_materials[2]._mats.keys())[1].comp.values())[i]) assert_equal( list(expected_multimaterial._mats.keys())[1].mass, list(read_materials[2]._mats.keys())[1].mass)