|
4 | 4 | import platform |
5 | 5 | import unittest |
6 | 6 |
|
| 7 | +from ansys.api.sherlock.v0.SherlockModelService_pb2 import PcbMaterialElasticity |
7 | 8 | import grpc |
8 | 9 | import pytest |
9 | 10 |
|
@@ -315,6 +316,7 @@ def test_export_FEA_model(self): |
315 | 316 | clear_FEA_database=True, |
316 | 317 | use_FEA_model_id=True, |
317 | 318 | coordinate_units="mm", |
| 319 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
318 | 320 | ) |
319 | 321 | pytest.fail("No exception raised for invalid project name") |
320 | 322 | except SherlockExportFEAModelError as e: |
@@ -348,8 +350,9 @@ def test_export_FEA_model(self): |
348 | 350 | clear_FEA_database=True, |
349 | 351 | use_FEA_model_id=True, |
350 | 352 | coordinate_units="mm", |
| 353 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
351 | 354 | ) |
352 | | - pytest.fail("No exception raised for invalid project name") |
| 355 | + pytest.fail("No exception raised for invalid CCA name") |
353 | 356 | except SherlockExportFEAModelError as e: |
354 | 357 | assert str(e) == "Export FEA model error: CCA name is invalid." |
355 | 358 |
|
@@ -381,8 +384,9 @@ def test_export_FEA_model(self): |
381 | 384 | clear_FEA_database=True, |
382 | 385 | use_FEA_model_id=True, |
383 | 386 | coordinate_units="mm", |
| 387 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
384 | 388 | ) |
385 | | - pytest.fail("No exception raised for invalid project name") |
| 389 | + pytest.fail("No exception raised for invalid file path") |
386 | 390 | except SherlockExportFEAModelError as e: |
387 | 391 | assert str(e) == "Export FEA model error: Export file path is invalid." |
388 | 392 |
|
@@ -414,8 +418,9 @@ def test_export_FEA_model(self): |
414 | 418 | clear_FEA_database=True, |
415 | 419 | use_FEA_model_id=True, |
416 | 420 | coordinate_units="mm", |
| 421 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
417 | 422 | ) |
418 | | - pytest.fail("No exception raised for invalid project name") |
| 423 | + pytest.fail("No exception raised for invalid file directory") |
419 | 424 | except SherlockExportFEAModelError as e: |
420 | 425 | assert str(e) == f'Export FEA model error: Export file directory "test" does not exist.' |
421 | 426 |
|
@@ -447,8 +452,9 @@ def test_export_FEA_model(self): |
447 | 452 | clear_FEA_database=True, |
448 | 453 | use_FEA_model_id=True, |
449 | 454 | coordinate_units="mm", |
| 455 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
450 | 456 | ) |
451 | | - pytest.fail("No exception raised for invalid project name") |
| 457 | + pytest.fail("No exception raised for invalid minimum hole diameter") |
452 | 458 | except SherlockExportFEAModelError as e: |
453 | 459 | assert str(e) == "Export FEA model error: Minimum hole diameter is invalid." |
454 | 460 |
|
@@ -480,8 +486,9 @@ def test_export_FEA_model(self): |
480 | 486 | clear_FEA_database=True, |
481 | 487 | use_FEA_model_id=True, |
482 | 488 | coordinate_units="mm", |
| 489 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
483 | 490 | ) |
484 | | - pytest.fail("No exception raised for invalid project name") |
| 491 | + pytest.fail("No exception raised for invalid maximum edge length") |
485 | 492 | except SherlockExportFEAModelError as e: |
486 | 493 | assert str(e) == "Export FEA model error: Maximum edge length is invalid." |
487 | 494 |
|
@@ -513,8 +520,9 @@ def test_export_FEA_model(self): |
513 | 520 | clear_FEA_database=True, |
514 | 521 | use_FEA_model_id=True, |
515 | 522 | coordinate_units="mm", |
| 523 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
516 | 524 | ) |
517 | | - pytest.fail("No exception raised for invalid project name") |
| 525 | + pytest.fail("No exception raised for invalid maximum mesh size") |
518 | 526 | except SherlockExportFEAModelError as e: |
519 | 527 | assert str(e) == "Export FEA model error: Maximum mesh size is invalid." |
520 | 528 |
|
@@ -546,8 +554,9 @@ def test_export_FEA_model(self): |
546 | 554 | clear_FEA_database=True, |
547 | 555 | use_FEA_model_id=True, |
548 | 556 | coordinate_units="mm", |
| 557 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
549 | 558 | ) |
550 | | - pytest.fail("No exception raised for invalid project name") |
| 559 | + pytest.fail("No exception raised for invalid vertical mesh size") |
551 | 560 | except SherlockExportFEAModelError as e: |
552 | 561 | assert str(e) == "Export FEA model error: Vertical mesh size is invalid." |
553 | 562 |
|
@@ -580,8 +589,9 @@ def test_export_FEA_model(self): |
580 | 589 | clear_FEA_database=True, |
581 | 590 | use_FEA_model_id=True, |
582 | 591 | coordinate_units="mm", |
| 592 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
583 | 593 | ) |
584 | | - pytest.fail("No exception raised for invalid project name") |
| 594 | + pytest.fail("No exception raised for invalid CCA name") |
585 | 595 | except Exception as e: |
586 | 596 | assert type(e) == SherlockExportFEAModelError |
587 | 597 |
|
@@ -613,6 +623,7 @@ def test_export_FEA_model(self): |
613 | 623 | clear_FEA_database=False, |
614 | 624 | use_FEA_model_id=False, |
615 | 625 | coordinate_units="mm", |
| 626 | + pcb_material_elasticity=PcbMaterialElasticity.Isotropic, |
616 | 627 | ) |
617 | 628 | assert result == 0 |
618 | 629 |
|
|
0 commit comments