Skip to content

Failing tests on Windows with GH artifact wheels #28

Description

@jdegenstein

Using an appropriate wheel from https://github.com/CadQuery/ocp-build-system/actions/runs/8367440736

I created a conda environment and discovered that 2 tests from CadQuery/cadquery are failing. Here is my setup process:

conda create -n env1 python=3.11
conda activate env1
pip install cadquery_ocp-7.7.2-cp311-cp311-win_amd64.whl # this also installs vtk=9.3.0 on my system
pip install cadquery
pip install ipython pytest
git clone https://github.com/CadQuery/cadquery.git
cd cadquery
python -m pytest

fails 2 tests and returns:

___________________________________________________________________ TestCadQuery.test_toVtk ____________________________________________________________________

self = <tests.test_cadquery.TestCadQuery testMethod=test_toVtk>

    def test_toVtk(self):

        from vtkmodules.vtkCommonDataModel import vtkPolyData

        f = Face.makePlane(2, 2)
        vtk = f.toVtkPolyData(normals=False)

        assert isinstance(vtk, vtkPolyData)
>       assert vtk.GetNumberOfPolys() == 2
E       assert 0 == 2
E        +  where 0 = <built-in method GetNumberOfPolys of vtkmodules.vtkCommonDataModel.vtkPolyData object at 0x0000017172998B20>()
E        +    where <built-in method GetNumberOfPolys of vtkmodules.vtkCommonDataModel.vtkPolyData object at 0x0000017172998B20> = <vtkmodules.vtkCommonDataModel.vtkPolyData(0x0000017155FF6E80) at 0x0000017172998B20>.GetNumberOfPolys

tests\test_cadquery.py:5634: AssertionError
--------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------- 2024-04-22 15:12:23.713 (  18.739s) [B3557CCDB772DC2B]vtkDemandDrivenPipeline:677    ERR| vtkCompositeDataPipeline (000001717144C740): Input port 0 of algorithm vtkTriangleFilter (00000171717DE5C0) has 0 connections but is not optional.
____________________________________________________________________ test_assy_vtk_rotation ____________________________________________________________________

tmpdir = WindowsPath()

    def test_assy_vtk_rotation(tmpdir):

        v0 = Vertex.makeVertex(1, 0, 0)

        assy = Assembly()
        assy.add(
            v0, name="v0", loc=Location(Vector(0, 0, 0), Vector(1, 0, 0), 90),
        )

        fwrl = Path(tmpdir, "v0.wrl")
        assert not fwrl.exists()
        assy.save(str(fwrl), "VRML")
        assert fwrl.exists()

        matched_rot = False
        with open(fwrl) as f:
            pat_rot = re.compile("""rotation 1 0 0 1.5707963267""")
            for line in f:
                if m := re.search(pat_rot, line):
                    matched_rot = True
                    break

>       assert matched_rot
E       assert False

tests\test_exporters.py:835: AssertionError
--------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------- 2024-04-22 15:12:29.652 (  24.678s) [B3557CCDB772DC2B]vtkDemandDrivenPipeline:677    ERR| vtkCompositeDataPipeline (0000017157D868C0): Input port 0 of algorithm vtkTriangleFilter (000001718E5DCAB0) has 0 connections but is not optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions