Code Duplication    Length = 10-10 lines in 3 locations

metpy/io/tests/test_upperair.py 3 locations

@@ 36-45 (lines=10) @@
33
    assert_almost_equal(data.variables['v_wind'][3], 2.46 * units.knot, 2)
34
35
36
def test_high_alt_wyoming():
37
    r'Test Wyoming data that starts at pressure less than 925 hPa'
38
    with UseSampleData():
39
        data = get_upper_air_data(datetime(2010, 12, 9, 12), 'BOI', source='wyoming')
40
41
    assert_almost_equal(data.variables['pressure'][4], 890.0 * units('hPa'), 2)
42
    assert_almost_equal(data.variables['temperature'][4], 5.4 * units.degC, 2)
43
    assert_almost_equal(data.variables['dewpoint'][4], 3.9 * units.degC, 2)
44
    assert_almost_equal(data.variables['u_wind'][4], -0.42 * units.knot, 2)
45
    assert_almost_equal(data.variables['v_wind'][4], 5.99 * units.knot, 2)
46
@@ 24-33 (lines=10) @@
21
    assert_almost_equal(data.variables['v_wind'][6], 37.42 * units.knot, 2)
22
23
24
def test_iastate():
25
    r'Test that we properly parse data from Iowa State archive'
26
    with UseSampleData():
27
        data = get_upper_air_data(datetime(2016, 7, 30, 12), 'KDEN', source='iastate')
28
29
    assert_almost_equal(data.variables['pressure'][3], 838.0 * units('hPa'), 2)
30
    assert_almost_equal(data.variables['temperature'][3], 17.0 * units.degC, 2)
31
    assert_almost_equal(data.variables['dewpoint'][3], 15.2 * units.degC, 2)
32
    assert_almost_equal(data.variables['u_wind'][3], 1.72 * units.knot, 2)
33
    assert_almost_equal(data.variables['v_wind'][3], 2.46 * units.knot, 2)
34
35
36
def test_high_alt_wyoming():
@@ 12-21 (lines=10) @@
9
from metpy.units import units
10
11
12
def test_wyoming():
13
    r'Test that we are properly parsing data from the wyoming archive'
14
    with UseSampleData():
15
        data = get_upper_air_data(datetime(1999, 5, 4, 0), 'OUN', source='wyoming')
16
17
    assert_almost_equal(data.variables['pressure'][6], 867.9 * units('hPa'), 2)
18
    assert_almost_equal(data.variables['temperature'][6], 17.4 * units.degC, 2)
19
    assert_almost_equal(data.variables['dewpoint'][6], 14.3 * units.degC, 2)
20
    assert_almost_equal(data.variables['u_wind'][6], 6.60 * units.knot, 2)
21
    assert_almost_equal(data.variables['v_wind'][6], 37.42 * units.knot, 2)
22
23
24
def test_iastate():