Code Duplication    Length = 14-15 lines in 2 locations

aacgmv2/tests/test_dep_aacgmv2.py 2 locations

@@ 112-126 (lines=15) @@
109
                                         [82.5909, 83.1286, 83.7039]],
110
                                   rtol=1e-4)
111
112
    def test_convert_unequal_arra(self):
113
        """Test conversion for unequal sized arrays"""
114
        self.lat, self.lon = aacgmv2.convert(np.array([[60, 61, 62],
115
                                                       [63, 64, 65]]),
116
                                             np.array([0]), np.array([300]),
117
                                             self.dtime)
118
        assert isinstance(self.lat, np.ndarray)
119
        assert isinstance(self.lon, np.ndarray)
120
        assert self.lat.shape == self.lon.shape and self.lat.shape == (2, 3)
121
        np.testing.assert_allclose(self.lat, [[58.2258, 59.3186, 60.4040],
122
                                              [61.4820, 62.5528, 63.6164]],
123
                                   rtol=1e-4)
124
        np.testing.assert_allclose(self.lon, [[81.1685, 81.6140, 82.0872],
125
                                              [82.5909, 83.1286, 83.7039]],
126
                                   rtol=1e-4)
127
128
    def test_convert_location_failure(self):
129
        """Test conversion with a bad location"""
@@ 97-110 (lines=14) @@
94
        np.testing.assert_allclose(self.lat, [58.2258, 59.3186], rtol=1e-4)
95
        np.testing.assert_allclose(self.lon, [81.1685, 81.6140], rtol=1e-4)
96
97
    def test_convert_mult_array_mix(self):
98
        """Test conversion for a multi-dim array and floats"""
99
        self.lat, self.lon = aacgmv2.convert(np.array([[60, 61, 62],
100
                                                       [63, 64, 65]]), 0,
101
                                             300, self.dtime)
102
        assert isinstance(self.lat, np.ndarray)
103
        assert isinstance(self.lon, np.ndarray)
104
        assert self.lat.shape == self.lon.shape and self.lat.shape == (2, 3)
105
        np.testing.assert_allclose(self.lat, [[58.2258, 59.3186, 60.4040],
106
                                         [61.4820, 62.5528, 63.6164]],
107
                                   rtol=1e-4)
108
        np.testing.assert_allclose(self.lon, [[81.1685, 81.6140, 82.0872],
109
                                         [82.5909, 83.1286, 83.7039]],
110
                                   rtol=1e-4)
111
112
    def test_convert_unequal_arra(self):
113
        """Test conversion for unequal sized arrays"""