running pytest running egg_info creating gdstk.egg-info writing gdstk.egg-info/PKG-INFO writing dependency_links to gdstk.egg-info/dependency_links.txt writing requirements to gdstk.egg-info/requires.txt writing top-level names to gdstk.egg-info/top_level.txt writing manifest file 'gdstk.egg-info/SOURCES.txt' reading manifest file 'gdstk.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'gdstk.egg-info/SOURCES.txt' running build_ext cmake -S /build/python-gdstk/src/gdstk-0.8.1 -B /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build -DCMAKE_INSTALL_PREFIX=/build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install -DCMAKE_BUILD_TYPE=Release -- Configuring done -- Generating done -- Build files have been written to: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build cmake --build /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build --config Release --target install Consolidate compiler generated dependencies of target gdstk [100%] Built target gdstk Install the project... -- Install configuration: "Release" -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/lib/libgdstk.a -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/allocator.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/array.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/cell.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/clipper_tools.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/curve.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/flexpath.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/font.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/gdsii.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/gdswriter.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/label.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/library.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/map.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/oasis.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/pathcommon.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/polygon.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/property.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/rawcell.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/reference.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/repetition.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/robustpath.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/set.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/sort.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/style.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/utils.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk/vec.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/include/gdstk.h -- Up-to-date: /build/python-gdstk/src/gdstk-0.8.1/build/temp.linux-riscv64-3.10/cmake_build/install/lib/pkgconfig/gdstk.pc copying build/lib.linux-riscv64-3.10/gdstk.cpython-310-riscv64-linux-gnu.so -> ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 rootdir: /build/python-gdstk/src/gdstk-0.8.1 collected 59 items tests/cell_test.py ................ [ 27%] tests/curve_test.py .. [ 30%] tests/flexpath_test.py ... [ 35%] tests/functions_test.py . [ 37%] tests/library_test.py ....FF........ [ 61%] tests/polygon_test.py ........... [ 79%] tests/property_test.py .. [ 83%] tests/reference_test.py .... [ 89%] tests/robustpath_test.py ...... [100%] =================================== FAILURES =================================== _________________________________ test_rw_gds __________________________________ tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_rw_gds0') sample_library = def test_rw_gds(tmpdir, sample_library): fname = str(tmpdir.join("test.gds")) sample_library.write_gds(fname, max_points=20) library = gdstk.read_gds(fname, unit=1e-3) assert library.name == "lib" assert len(library.cells) == 4 cells = {c.name: c for c in library.cells} assert set(cells.keys()) == { "gl_rw_gds_1", "gl_rw_gds_2", "gl_rw_gds_3", "gl_rw_gds_4", } c = cells["gl_rw_gds_1"] assert len(c.polygons) == len(c.labels) == 1 assert c.polygons[0].area() == 12.0 assert c.polygons[0].layer == 2 assert c.polygons[0].datatype == 4 assert c.labels[0].text == "label" assert c.labels[0].origin[0] == 2 and c.labels[0].origin[1] == -2 assert c.labels[0].anchor == "w" assert c.labels[0].rotation == 10 assert c.labels[0].magnification == 1.5 assert c.labels[0].x_reflection == True assert c.labels[0].layer == 5 assert c.labels[0].texttype == 6 c = cells["gl_rw_gds_2"] assert len(c.polygons) == 2 assert isinstance(c.polygons[0], gdstk.Polygon) and isinstance( c.polygons[1], gdstk.Polygon ) c = cells["gl_rw_gds_3"] assert len(c.references) == 1 assert isinstance(c.references[0], gdstk.Reference) assert c.references[0].cell == cells["gl_rw_gds_1"] assert c.references[0].origin[0] == 0 and c.references[0].origin[1] == 2 assert c.references[0].rotation == -90 assert c.references[0].magnification == 2 assert c.references[0].x_reflection == True c = cells["gl_rw_gds_4"] assert len(c.references) == 1 assert isinstance(c.references[0], gdstk.Reference) assert c.references[0].cell == cells["gl_rw_gds_2"] assert c.references[0].origin[0] == -2 and c.references[0].origin[1] == -4 assert c.references[0].rotation == numpy.pi assert c.references[0].magnification == 0.5 assert c.references[0].x_reflection == True assert c.references[0].repetition.columns == 2 assert c.references[0].repetition.rows == 3 > assert c.references[0].repetition.v1 == (-2.0, 0.0) E assert (-2.0, -4.163336342344337e-17) == (-2.0, 0.0) E At index 1 diff: -4.163336342344337e-17 != 0.0 E Use -v to get the full diff tests/library_test.py:153: AssertionError ______________________________ test_rw_gds_filter ______________________________ tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_rw_gds_filter0') sample_library = def test_rw_gds_filter(tmpdir, sample_library): fname = str(tmpdir.join("test.gds")) sample_library.write_gds(fname, max_points=20) library = gdstk.read_gds(fname, unit=1e-3, filter={(0, 0)}) assert library.name == "lib" assert len(library.cells) == 4 cells = {c.name: c for c in library.cells} assert set(cells.keys()) == { "gl_rw_gds_1", "gl_rw_gds_2", "gl_rw_gds_3", "gl_rw_gds_4", } c = cells["gl_rw_gds_1"] assert len(c.polygons) == 0 assert len(c.labels) == 1 assert c.labels[0].text == "label" assert c.labels[0].origin[0] == 2 and c.labels[0].origin[1] == -2 assert c.labels[0].anchor == "w" assert c.labels[0].rotation == 10 assert c.labels[0].magnification == 1.5 assert c.labels[0].x_reflection == True assert c.labels[0].layer == 5 assert c.labels[0].texttype == 6 c = cells["gl_rw_gds_2"] assert len(c.polygons) == 2 assert isinstance(c.polygons[0], gdstk.Polygon) and isinstance( c.polygons[1], gdstk.Polygon ) c = cells["gl_rw_gds_3"] assert len(c.references) == 1 assert isinstance(c.references[0], gdstk.Reference) assert c.references[0].cell == cells["gl_rw_gds_1"] assert c.references[0].origin[0] == 0 and c.references[0].origin[1] == 2 assert c.references[0].rotation == -90 assert c.references[0].magnification == 2 assert c.references[0].x_reflection == True c = cells["gl_rw_gds_4"] assert len(c.references) == 1 assert isinstance(c.references[0], gdstk.Reference) assert c.references[0].cell == cells["gl_rw_gds_2"] assert c.references[0].origin[0] == -2 and c.references[0].origin[1] == -4 assert c.references[0].rotation == numpy.pi assert c.references[0].magnification == 0.5 assert c.references[0].x_reflection == True assert c.references[0].repetition.columns == 2 assert c.references[0].repetition.rows == 3 > assert c.references[0].repetition.v1 == (-2.0, 0.0) E assert (-2.0, -4.163336342344337e-17) == (-2.0, 0.0) E At index 1 diff: -4.163336342344337e-17 != 0.0 E Use -v to get the full diff tests/library_test.py:208: AssertionError =========================== short test summary info ============================ FAILED tests/library_test.py::test_rw_gds - assert (-2.0, -4.163336342344337e... FAILED tests/library_test.py::test_rw_gds_filter - assert (-2.0, -4.163336342... ========================= 2 failed, 57 passed in 2.67s ========================= ==> ERROR: A failure occurred in check().  Aborting...