Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_setvalue():
c = mc.SetValue('val', 23.1)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="23.1"'
c = mc.SetValue('val', -0.123010929395)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="-0.123010929395"'
c = mc.SetValue('val', "hallo world")
assert c.get_macro(0) == 'classoperation val "Set Value" --value="hallo world"'
c = mc.SetValue('val', [3.0,4,5.1])
assert c.get_macro(0) == 'classoperation val "Set Value" --value="3"'
assert c.get_macro(1) == 'classoperation val "Set Value" --value="4"'
assert c.get_macro(2) == 'classoperation val "Set Value" --value="5.1"'
assert c.get_macro(3) == 'classoperation val "Set Value" --value="3"'
c = mc.SetValue('val', np.array([1,2,3,4]))
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{1,2,3,4}"'
c = mc.SetValue('val', np.array([[1,0],[0,1]]) )
def test_setvalue():
c = mc.SetValue('val', 23.1)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="23.1"'
c = mc.SetValue('val', -0.123010929395)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="-0.123010929395"'
c = mc.SetValue('val', "hallo world")
assert c.get_macro(0) == 'classoperation val "Set Value" --value="hallo world"'
c = mc.SetValue('val', [3.0,4,5.1])
assert c.get_macro(0) == 'classoperation val "Set Value" --value="3"'
assert c.get_macro(1) == 'classoperation val "Set Value" --value="4"'
assert c.get_macro(2) == 'classoperation val "Set Value" --value="5.1"'
assert c.get_macro(3) == 'classoperation val "Set Value" --value="3"'
c = mc.SetValue('val', np.array([1,2,3,4]))
assert c.get_macro(0) == 'classoperation val "Set Value" --value="-0.123010929395"'
c = mc.SetValue('val', "hallo world")
assert c.get_macro(0) == 'classoperation val "Set Value" --value="hallo world"'
c = mc.SetValue('val', [3.0,4,5.1])
assert c.get_macro(0) == 'classoperation val "Set Value" --value="3"'
assert c.get_macro(1) == 'classoperation val "Set Value" --value="4"'
assert c.get_macro(2) == 'classoperation val "Set Value" --value="5.1"'
assert c.get_macro(3) == 'classoperation val "Set Value" --value="3"'
c = mc.SetValue('val', np.array([1,2,3,4]))
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{1,2,3,4}"'
c = mc.SetValue('val', np.array([[1,0],[0,1]]) )
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{{1,0},{0,1}}"'
def test_setvalue():
c = mc.SetValue('val', 23.1)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="23.1"'
c = mc.SetValue('val', -0.123010929395)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="-0.123010929395"'
c = mc.SetValue('val', "hallo world")
assert c.get_macro(0) == 'classoperation val "Set Value" --value="hallo world"'
c = mc.SetValue('val', [3.0,4,5.1])
assert c.get_macro(0) == 'classoperation val "Set Value" --value="3"'
assert c.get_macro(1) == 'classoperation val "Set Value" --value="4"'
assert c.get_macro(2) == 'classoperation val "Set Value" --value="5.1"'
assert c.get_macro(3) == 'classoperation val "Set Value" --value="3"'
c = mc.SetValue('val', np.array([1,2,3,4]))
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{1,2,3,4}"'
c = mc.SetValue('val', np.array([[1,0],[0,1]]) )
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{{1,0},{0,1}}"'
assert c.get_macro(0) == 'classoperation val "Set Value" --value="23.1"'
c = mc.SetValue('val', -0.123010929395)
assert c.get_macro(0) == 'classoperation val "Set Value" --value="-0.123010929395"'
c = mc.SetValue('val', "hallo world")
assert c.get_macro(0) == 'classoperation val "Set Value" --value="hallo world"'
c = mc.SetValue('val', [3.0,4,5.1])
assert c.get_macro(0) == 'classoperation val "Set Value" --value="3"'
assert c.get_macro(1) == 'classoperation val "Set Value" --value="4"'
assert c.get_macro(2) == 'classoperation val "Set Value" --value="5.1"'
assert c.get_macro(3) == 'classoperation val "Set Value" --value="3"'
c = mc.SetValue('val', np.array([1,2,3,4]))
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{1,2,3,4}"'
c = mc.SetValue('val', np.array([[1,0],[0,1]]) )
assert c.get_macro(0) == 'classoperation val "Set Value" --value="{{1,0},{0,1}}"'