@@ -935,7 +935,7 @@ def test_plot_design_face_colors(modeler: Modeler, verify_image_cache):
935
935
936
936
937
937
@skip_no_xserver
938
- def test_export_glb (modeler : Modeler , verify_image_cache ):
938
+ def test_export_glb (modeler : Modeler ):
939
939
"""Test exporting a box to glb."""
940
940
# Create a Sketch
941
941
sketch = Sketch ()
@@ -953,9 +953,13 @@ def test_export_glb(modeler: Modeler, verify_image_cache):
953
953
output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_box_glb" )
954
954
pl .export_glb (filename = output_glb_path )
955
955
956
+ # Add suffix to the output path
957
+ output_glb_path = output_glb_path .with_suffix (".glb" )
958
+ assert output_glb_path .exists (), "GLB file was not created successfully."
959
+
956
960
957
961
@skip_no_xserver
958
- def test_export_glb_with_color (modeler : Modeler , verify_image_cache ):
962
+ def test_export_glb_with_color (modeler : Modeler ):
959
963
"""Test exporting a box to glb."""
960
964
# Create a Sketch
961
965
sketch = Sketch ()
@@ -971,9 +975,11 @@ def test_export_glb_with_color(modeler: Modeler, verify_image_cache):
971
975
pl = GeometryPlotter (use_service_colors = True )
972
976
pl .plot (box_body )
973
977
974
- output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_box_glb_colored" )
978
+ output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_box_glb_colored.glb " )
975
979
pl .export_glb (filename = output_glb_path )
976
980
981
+ assert output_glb_path .exists (), "GLB file with color was not created successfully."
982
+
977
983
978
984
@skip_no_xserver
979
985
def test_export_glb_with_face_color (modeler : Modeler ):
@@ -993,12 +999,14 @@ def test_export_glb_with_face_color(modeler: Modeler):
993
999
994
1000
pl = GeometryPlotter (use_service_colors = True )
995
1001
996
- output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_box_glb_face_colored" )
1002
+ output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_box_glb_face_colored.glb " )
997
1003
pl .export_glb (box_body , filename = output_glb_path )
998
1004
1005
+ assert output_glb_path .exists (), "GLB file with face color was not created successfully."
1006
+
999
1007
1000
1008
@skip_no_xserver
1001
- def test_export_glb_cylinder_with_face_color (modeler : Modeler , verify_image_cache ):
1009
+ def test_export_glb_cylinder_with_face_color (modeler : Modeler ):
1002
1010
"""Test exporting a cylinder to glb."""
1003
1011
# Create your design on the server side
1004
1012
design = modeler .create_design ("GLBCylinderWithFaceColors" )
@@ -1013,9 +1021,11 @@ def test_export_glb_cylinder_with_face_color(modeler: Modeler, verify_image_cach
1013
1021
1014
1022
pl = GeometryPlotter (use_service_colors = True )
1015
1023
1016
- output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_cylinder_glb_face_colored" )
1024
+ output_glb_path = Path (IMAGE_RESULTS_DIR , "plot_cylinder_glb_face_colored.glb " )
1017
1025
pl .export_glb (cyl , filename = output_glb_path )
1018
1026
1027
+ assert output_glb_path .exists (), "GLB file with face color was not created successfully."
1028
+
1019
1029
1020
1030
@skip_no_xserver
1021
1031
def test_plot_face_colors_from_service (modeler : Modeler , verify_image_cache ):
0 commit comments