Skip to content

Commit

Permalink
[Fix] Update RomViewerSharedLib.so in unit test files and update CI w…
Browse files Browse the repository at this point in the history
…orkflow (#119)

Co-authored-by: Lucas Boucinha <lboucin@ansys.com>
  • Loading branch information
lboucin and Lucas Boucinha authored Sep 19, 2023
1 parent aab47af commit 6b860f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ jobs:
os: [pytwin-win10, ubuntu-20.04]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Install Ubuntu dependencies for RomViewerSharedLib.so
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install libosmesa6
- name: Run pytest
uses: ansys/actions/tests-pytest@v4
with:
Expand Down
Binary file added tests/evaluate/data/ThermalTBROM_23R2.twin
Binary file not shown.
17 changes: 7 additions & 10 deletions tests/evaluate/test_tbrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,19 +928,16 @@ def test_tbrom_getters_exceptions_other(self):

def test_tbrom_image_generation_at_initialization(self):
reinit_settings()
model_filepath = download_file("ThermalTBROM_23R1_other.twin", "twin_files")
model_filepath = os.path.join(os.path.dirname(__file__), "data", "ThermalTBROM_23R2.twin")
twin = TwinModel(model_filepath=model_filepath)
twin.initialize_evaluation()

# Verify IMAGE IS GENERATED AT INITIALIZATION
if sys.platform != "linux":
# TODO - Fix BUG755776
fp = twin.get_image_filepath(
rom_name=twin.tbrom_names[0],
view_name=twin.get_available_view_names(twin.tbrom_names[0])[0],
evaluation_time=0.0,
)
assert os.path.exists(fp)
fp = twin.get_image_filepath(
rom_name=twin.tbrom_names[0],
view_name=twin.get_available_view_names(twin.tbrom_names[0])[0],
evaluation_time=0.0,
)
assert os.path.exists(fp)

def test_tbrom_getters_warning(self):
reinit_settings()
Expand Down

0 comments on commit 6b860f5

Please sign in to comment.