

import nose
import nose.tools as nt

from properties.prandtl_meyer_function import mu_in_deg


@nt.raises(ValueError)
def test_mach_lesser_than_one():
    m = 0.1
    mu_in_deg(m)


def test_normal_mach():
    m1 = 1.5
    nt.assert_almost_equal(mu_in_deg(m1), 41.762, places=3)

    m2 = 2.6
    nt.assert_almost_equal(mu_in_deg(m2), 22.594, places=3)


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

from __future__ import absolute_import, division

import nose
import nose.tools as nt

from properties.prandtl_meyer_function import mu_in_deg


@nt.raises(ValueError)
def test_mach_lesser_than_one():
    m = 0.1
    mu_in_deg(m)


def test_normal_mach():
    m1 = 1.5
    nt.assert_almost_equal(mu_in_deg(m1),  41.8103148, places=3)

    m2 = 2.6
    nt.assert_almost_equal(mu_in_deg(m2),  22.6198649, places=3)


if __name__ == '__main__':
    nose.main()
Correct test data for mach angle
Correct test data for mach angle

  
+ from __future__ import absolute_import, division
  
  import nose
  import nose.tools as nt
  
  from properties.prandtl_meyer_function import mu_in_deg
  
  
  @nt.raises(ValueError)
  def test_mach_lesser_than_one():
      m = 0.1
      mu_in_deg(m)
  
  
  def test_normal_mach():
      m1 = 1.5
-     nt.assert_almost_equal(mu_in_deg(m1), 41.762, places=3)
+     nt.assert_almost_equal(mu_in_deg(m1),  41.8103148, places=3)
  
      m2 = 2.6
-     nt.assert_almost_equal(mu_in_deg(m2), 22.594, places=3)
+     nt.assert_almost_equal(mu_in_deg(m2),  22.6198649, places=3)
  
  
  if __name__ == '__main__':
      nose.main()
Correct test data for mach angle
## Code Before:


import nose
import nose.tools as nt

from properties.prandtl_meyer_function import mu_in_deg


@nt.raises(ValueError)
def test_mach_lesser_than_one():
    m = 0.1
    mu_in_deg(m)


def test_normal_mach():
    m1 = 1.5
    nt.assert_almost_equal(mu_in_deg(m1), 41.762, places=3)

    m2 = 2.6
    nt.assert_almost_equal(mu_in_deg(m2), 22.594, places=3)


if __name__ == '__main__':
    nose.main()
## Instruction:
Correct test data for mach angle
## Code After:

from __future__ import absolute_import, division

import nose
import nose.tools as nt

from properties.prandtl_meyer_function import mu_in_deg


@nt.raises(ValueError)
def test_mach_lesser_than_one():
    m = 0.1
    mu_in_deg(m)


def test_normal_mach():
    m1 = 1.5
    nt.assert_almost_equal(mu_in_deg(m1),  41.8103148, places=3)

    m2 = 2.6
    nt.assert_almost_equal(mu_in_deg(m2),  22.6198649, places=3)


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