Code Duplication    Length = 14-15 lines in 2 locations

aacgmv2/tests/test_dep_aacgmv2.py 2 locations

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