def test_get_plane_normal(run_with_maya_pymel, setup_path):
    from maya import OpenMaya
    import pymel.core as pm
    from mgear.core.vector import get_plane_normal
    vector_a = OpenMaya.MVector(0, 0, 0)
    vector_b = OpenMaya.MVector(1, 0, 0)
    vector_c = OpenMaya.MVector(0, 0, 1)
    result = get_plane_normal(vector_a, vector_b, vector_c)
    assert (type(result) == OpenMaya.MVector)
    assert ([result[0], result[1], result[2]] == [0, 1, 0])
    pm.newFile(force=True)
    vector_a = pm.createNode('transform')
    vector_b = pm.createNode('transform')
    vector_c = pm.createNode('transform')
    vector_b.translate.set((- 1), 0, 0)
    vector_c.translate.set(0, 0, 1)
    result = get_plane_normal(vector_a, vector_b, vector_c)
    assert ([result[0], result[1], result[2]] == [0, (- 1), 0])
    result = get_plane_normal(list(vector_a.getTranslation()), list(vector_b.getTranslation()), list(vector_c.getTranslation()))
    assert ([result[0], result[1], result[2]] == [0, (- 1), 0])
def test_get_plane_normal(run_with_maya_pymel, setup_path):
    from maya import OpenMaya
    import pymel.core as pm
    from mgear.core.vector import get_plane_normal
    vector_a = OpenMaya.MVector(0, 0, 0)
    vector_b = OpenMaya.MVector(1, 0, 0)
    vector_c = OpenMaya.MVector(0, 0, 1)
    result = get_plane_normal(vector_a, vector_b, vector_c)
    assert (type(result) == OpenMaya.MVector)
    assert ([result[0], result[1], result[2]] == [0, 1, 0])
    pm.newFile(force=True)
    vector_a = pm.createNode('transform')
    vector_b = pm.createNode('transform')
    vector_c = pm.createNode('transform')
    vector_b.translate.set((- 1), 0, 0)
    vector_c.translate.set(0, 0, 1)
    result = get_plane_normal(vector_a, vector_b, vector_c)
    assert ([result[0], result[1], result[2]] == [0, (- 1), 0])
    result = get_plane_normal(list(vector_a.getTranslation()), list(vector_b.getTranslation()), list(vector_c.getTranslation()))
    assert ([result[0], result[1], result[2]] == [0, (- 1), 0])