diff --git a/Tests/GUI/DMachineSetup/test_SPreview.py b/Tests/GUI/DMachineSetup/test_SPreview.py index 3c7571b9f..e2d7375f7 100644 --- a/Tests/GUI/DMachineSetup/test_SPreview.py +++ b/Tests/GUI/DMachineSetup/test_SPreview.py @@ -28,9 +28,12 @@ ("Stator phase number", "3"), ("Stator winding resistance", "0.02392 Ohm"), ("Machine total mass", "342.8 kg"), + ("Stator lamination mass", "143.6 kg"), ("Stator winding mass", "59.06 kg"), + ("Rotor lamination mass", "97.54 kg"), + ("Rotor winding mass", "21.12 kg"), ], - "Nrow": 9, + "Nrow": 12, } IPMSM_dict = { "file_path": join(machine_path, "Toyota_Prius.json").replace("\\", "/"), @@ -42,14 +45,16 @@ ("Stator phase number", "3"), ("Stator winding resistance", "0.03595 Ohm"), ("Machine total mass", "33.38 kg"), + ("Stator lamination mass", "15.78 kg"), ("Stator winding mass", "4.001 kg"), + ("Rotor lamination mass", "5.006 kg"), ("Rotor magnet mass", "1.236 kg"), ], - "Nrow": 9, + "Nrow": 11, } load_preview_test = [SCIM_dict, IPMSM_dict] - +# python -m pytest ./Tests/GUI/DMachineSetup/test_SPreview.py class TestSPreview(object): def setup_method(self): """Setup the workspace and the GUI""" diff --git a/Tests/Methods/Machine/test_desc_dict.py b/Tests/Methods/Machine/test_desc_dict.py index 53ad0362f..1dc31145e 100644 --- a/Tests/Methods/Machine/test_desc_dict.py +++ b/Tests/Methods/Machine/test_desc_dict.py @@ -14,7 +14,7 @@ def test_desc_SCIM(): """Check that the description of a SCIM is correct""" Railway_Traction = load(join(DATA_DIR, "Machine", "Railway_Traction.json")) desc_dict = Railway_Traction.comp_desc_dict() - assert len(desc_dict) == 9 + assert len(desc_dict) == 12 assert desc_dict[0]["name"] == "Type" assert desc_dict[0]["value"] == "SCIM" @@ -39,16 +39,24 @@ def test_desc_SCIM(): assert desc_dict[7]["name"] == "Mmachine" assert desc_dict[7]["value"] == pytest.approx(342.819, rel=0.1) - assert desc_dict[8]["name"] == "Mwind" - assert desc_dict[8]["value"] == pytest.approx(59.055, rel=0.1) + assert desc_dict[8]["name"] == "Mslam" + assert desc_dict[8]["value"] == pytest.approx(143.598, rel=0.1) + assert desc_dict[9]["name"] == "Mswind" + assert desc_dict[9]["value"] == pytest.approx(59.055, rel=0.1) + + assert desc_dict[10]["name"] == "Mrlam" + assert desc_dict[10]["value"] == pytest.approx(97.5362, rel=0.1) + + assert desc_dict[11]["name"] == "Mrwind" + assert desc_dict[11]["value"] == pytest.approx(21.118, rel=0.1) @pytest.mark.IPMSM def test_desc_IPMSM(): """Check that the description of an IPMSM is correct""" Toyota_Prius = load(join(DATA_DIR, "Machine", "Toyota_Prius.json")) desc_dict = Toyota_Prius.comp_desc_dict() - assert len(desc_dict) == 9 + assert len(desc_dict) == 11 assert desc_dict[0]["name"] == "Type" assert desc_dict[0]["value"] == "IPMSM" @@ -70,11 +78,17 @@ def test_desc_IPMSM(): assert desc_dict[6]["name"] == "Mmachine" assert desc_dict[6]["value"] == pytest.approx(33.37, rel=0.1) - assert desc_dict[7]["name"] == "Mwind" - assert desc_dict[7]["value"] == pytest.approx(4.0014, rel=0.1) + assert desc_dict[7]["name"] == "Mslam" + assert desc_dict[7]["value"] == pytest.approx(15.78146, rel=0.1) + + assert desc_dict[8]["name"] == "Mswind" + assert desc_dict[8]["value"] == pytest.approx(4.0014, rel=0.1) + + assert desc_dict[9]["name"] == "Mrlam" + assert desc_dict[9]["value"] == pytest.approx(5.0063, rel=0.1) - assert desc_dict[8]["name"] == "Mmag" - assert desc_dict[8]["value"] == pytest.approx(1.235, rel=0.1) + assert desc_dict[10]["name"] == "Mmag" + assert desc_dict[10]["value"] == pytest.approx(1.235, rel=0.1) @pytest.mark.outer_rotor