File: test_labels.py

package info (click to toggle)
pygmsh 7.1.17-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 684 kB
  • sloc: python: 3,070; makefile: 164; sh: 7
file content (11 lines) | stat: -rw-r--r-- 308 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
import pytest


def test_raise_duplicate():
    import pygmsh

    with pygmsh.geo.Geometry() as geom:
        p = geom.add_rectangle(-1, 1, -1, 1, z=0, mesh_size=1)
        geom.add_physical(p.lines[0], label="A")
        with pytest.raises(ValueError):
            geom.add_physical(p.lines[1], label="A")