def test_make_plot_wet_only(wet_nodes, wet_elements, mocker):
    mesh = AdcircMesh(wet_nodes, wet_elements)

    mocker.patch('matplotlib.pyplot.show')
    mesh.make_plot()

    assert isinstance(mesh, AdcircMesh)
Example #2
0
 def test_make_plot(self, mock):
     h = AdcircMesh(self.nodes, self.elements)
     h.make_plot(show=True,
                 extent=[0, 1, 0, 1],
                 title='test',
                 cbar_label='elevation [m]',
                 vmax=0.)
     self.assertIsInstance(h, AdcircMesh)
def test_make_plot(nodes, elements, mocker):
    mocker.patch('matplotlib.pyplot.show')

    mesh = AdcircMesh(nodes, elements)
    mesh.make_plot(
        show=True,
        extent=[0, 1, 0, 1],
        title='test',
        cbar_label='elevation [m]',
        vmax=0.0,
    )

    assert isinstance(mesh, AdcircMesh)
Example #4
0
 def test_make_plot_wet_only(self, mock):
     nodes = {
         0: ((0., 0.), 0.),
         1: ((1., 0.), -1.),
         2: ((1., 1.), -2.),
         3: ((0., 1.), -3.),
         4: ((0.5, 1.5), -4.),
     }
     elements = {
         0: [2, 4, 3],
         1: [0, 1, 2, 3],
     }
     h = AdcircMesh(nodes, elements)
     h.make_plot()
     self.assertIsInstance(h, AdcircMesh)
Example #5
0
 def test_make_plot_flat_domain(self, mock):
     nodes = {id: (coord, 0.) for id, (coord, _) in self.nodes.items()}
     h = AdcircMesh(nodes, self.elements, self.boundaries)
     h.make_plot()
def test_make_plot_flat_domain(nodes, elements, boundaries, mocker):
    nodes = {id: (*coord[:2], 0.0) for id, coord in nodes.items()}
    mesh = AdcircMesh(nodes, elements, boundaries=boundaries)

    mocker.patch('matplotlib.pyplot.show')
    mesh.make_plot()