Skip to content

Instantly share code, notes, and snippets.

@rmatsum836
Created June 10, 2020 16:50
Show Gist options
  • Save rmatsum836/f8bee48d362cd015ae9d3d4535c70b47 to your computer and use it in GitHub Desktop.
Save rmatsum836/f8bee48d362cd015ae9d3d4535c70b47 to your computer and use it in GitHub Desktop.
@pytest.mark.parametrize('orientations,constraints',
[((True, False, False),["constrain_rotation x"]),
((False, True, False),["constrain_rotation y"]),
((False, False, True),["constrain_rotation z"]),
((True, True, False),["constrain_rotation x",
"constrain_rotation y"]),
((False, True, True),["constrain_rotation y",
"constrain_rotation z"]),
((True, False, True),["constrain_rotation x",
"constrain_rotation z"])])
def test_specify_axis(self, orientations, constraints):
for i in constraints:
assert i in mb.packing.packmol_constrain(orientations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment