Skip to content

Commit

Permalink
Test plot_nets
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosavola committed Oct 18, 2023
1 parent 21dc214 commit 8d1bc09
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions gplugins/klayout/tests/test_plot_nets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from pathlib import Path

import pytest
from gdsfactory.samples.demo.lvs import pads_correct

from gplugins.klayout.get_netlist import get_l2n
from gplugins.klayout.plot_nets import plot_nets


@pytest.fixture
def klayout_netlist(tmp_path):
c = pads_correct()

gdspath = c.write_gds(gdsdir=tmp_path)
l2n = get_l2n(gdspath)
netlist_path = str(Path(tmp_path) / f"{c.name}.txt")
l2n.write_l2n(netlist_path)
return netlist_path


def test_plot_nets(klayout_netlist):
plot_nets(klayout_netlist)


def test_plot_nets_interactive(klayout_netlist):
plot_nets(klayout_netlist, interactive=True)
assert Path("connectivity.html").exists()

0 comments on commit 8d1bc09

Please sign in to comment.