from pathlib import Path
from pytest import fixture
from msh2shapely import elements2multilinestring


@fixture
def msh_example():
    s = """
# nodes section
# num x y
3
1    0.0    0.0
2    1.0    1.0
3    1.0    0.0
# elements section
# num i j [k [l]]
2
1    1    2
2    1    2    3    0
# boundaries section
# num node
1
1    1"""[1:]
    return s


def test_elements2multilinestring(msh_example):
    assert elements2multilinestring(msh_example)

def test_box():
    box_msh = Path('box.msh').read_text()
    assert elements2multilinestring(box_msh)

e3e863245c809d41a7ea41b8cab8c50360d8a88e
<mask token>


def test_box():
    box_msh = Path('box.msh').read_text()
    assert elements2multilinestring(box_msh)

<mask token>


@fixture
def msh_example():
    s = (
        """
# nodes section
# num x y
3
1    0.0    0.0
2    1.0    1.0
3    1.0    0.0
# elements section
# num i j [k [l]]
2
1    1    2
2    1    2    3    0
# boundaries section
# num node
1
1    1"""
        [1:])
    return s


<mask token>


def test_box():
    box_msh = Path('box.msh').read_text()
    assert elements2multilinestring(box_msh)

<mask token>


@fixture
def msh_example():
    s = (
        """
# nodes section
# num x y
3
1    0.0    0.0
2    1.0    1.0
3    1.0    0.0
# elements section
# num i j [k [l]]
2
1    1    2
2    1    2    3    0
# boundaries section
# num node
1
1    1"""
        [1:])
    return s


def test_elements2multilinestring(msh_example):
    assert elements2multilinestring(msh_example)


def test_box():
    box_msh = Path('box.msh').read_text()
    assert elements2multilinestring(box_msh)

from pathlib import Path
from pytest import fixture
from msh2shapely import elements2multilinestring


@fixture
def msh_example():
    s = (
        """
# nodes section
# num x y
3
1    0.0    0.0
2    1.0    1.0
3    1.0    0.0
# elements section
# num i j [k [l]]
2
1    1    2
2    1    2    3    0
# boundaries section
# num node
1
1    1"""
        [1:])
    return s


def test_elements2multilinestring(msh_example):
    assert elements2multilinestring(msh_example)


def test_box():
    box_msh = Path('box.msh').read_text()
    assert elements2multilinestring(box_msh)

from pathlib import Path
from pytest import fixture
from msh2shapely import elements2multilinestring


@fixture
def msh_example():
    s = """
# nodes section
# num x y
3
1    0.0    0.0
2    1.0    1.0
3    1.0    0.0
# elements section
# num i j [k [l]]
2
1    1    2
2    1    2    3    0
# boundaries section
# num node
1
1    1"""[1:]
    return s


def test_elements2multilinestring(msh_example):
    assert elements2multilinestring(msh_example)

def test_box():
    box_msh = Path('box.msh').read_text()
    assert elements2multilinestring(box_msh)
