import numpy as np

import OpenPNM
import pytest

test_network = OpenPNM.Network.TestNet()

def test_print():
  print( test_network )

def test_rectilinear_integrity():
  R = np.random.rand(2,3,4)
  # prune the mini way
  network = OpenPNM.Network.Template()
  network.generate(R)
  network.trim( ( R.ravel() <= R.mean() ) )
  O = network.asarray(network['pore.values'])
  # what it would look like normally
  M = np.where(R > R.mean(), R, 0)
  assert np.allclose(M, O)

if __name__ == '__main__':
  pytest.main()

@@ -128,16 +128,829 @@
 work )%0A%0A
+def test_add_boundary():%0A  pn = OpenPNM.Network.Cubic(name='net',loglevel=20,divisions=%5B5,5,5%5D,%0A                             lattice_spacing=%5B0.0001%5D,add_boundaries=True)%0A%0A  keys_expected = %7B'pore.all', 'pore.back', 'pore.back_face', 'pore.bottom',%0A  'pore.bottom_face','pore.boundary', 'pore.coords', 'pore.front',%0A  'pore.front_face', 'pore.left', 'pore.left_face', 'pore.right',%0A  'pore.right_face', 'pore.top', 'pore.top_face', 'throat.all', 'throat.back',%0A  'throat.back_face', 'throat.bottom', 'throat.bottom_face', 'throat.boundary',%0A  'throat.conns', 'throat.front', 'throat.front_face', 'throat.left',%0A  'throat.left_face', 'throat.right', 'throat.right_face', 'throat.top',%0A  'throat.top_face'%7D%0A%0A  keys_found = set(pn.keys())%0A%0A  symmetric_diff = keys_found %5E keys_expected%0A  assert not symmetric_diff%0A%0A%0A
 def test

Test for "add_boundary" process