Code Duplication    Length = 13-16 lines in 2 locations

aacgmv2/tests/test_py_aacgmv2.py 2 locations

@@ 695-710 (lines=16) @@
692
                                    [0.2839, 0.3198, 0.3582]], rtol=1e-3)
693
        del mlat_in
694
695
    def test_get_aacgm_coord_arr_badidea_failure(self):
696
        """Test array AACGMV2 calculation failure for BADIDEA"""
697
        method = "BADIDEA"
698
        (self.mlat_out, self.mlon_out,
699
         self.mlt_out) = aacgmv2.get_aacgm_coord_arr([60], [0], [3000],
700
                                                     self.dtime, method=method)
701
702
        assert isinstance(self.mlat_out, np.ndarray)
703
        assert isinstance(self.mlon_out, np.ndarray)
704
        assert isinstance(self.mlt_out, np.ndarray)
705
        assert (self.mlt_out.shape == self.mlon_out.shape and
706
                self.mlat_out.shape == self.mlt_out.shape and
707
                self.mlt_out.shape == (1,))
708
        assert np.all([np.isnan(self.mlat_out), np.isnan(self.mlon_out),
709
                       np.isnan(self.mlt_out)])
710
        del method
711
712
    def test_get_aacgm_coord_arr_location_failure(self):
713
        """Test array AACGMV2 calculation with a bad location"""
@@ 712-724 (lines=13) @@
709
                       np.isnan(self.mlt_out)])
710
        del method
711
712
    def test_get_aacgm_coord_arr_location_failure(self):
713
        """Test array AACGMV2 calculation with a bad location"""
714
        (self.mlat_out, self.mlon_out,
715
         self.mlt_out) = aacgmv2.get_aacgm_coord_arr([0], [0], [0], self.dtime)
716
717
        assert isinstance(self.mlat_out, np.ndarray)
718
        assert isinstance(self.mlon_out, np.ndarray)
719
        assert isinstance(self.mlt_out, np.ndarray)
720
        assert (self.mlt_out.shape == self.mlon_out.shape and
721
                self.mlat_out.shape == self.mlt_out.shape and
722
                self.mlt_out.shape == (1,))
723
        assert np.all([np.isnan(self.mlat_out), np.isnan(self.mlon_out),
724
                       np.isnan(self.mlt_out)])
725
726
    def test_get_aacgm_coord_arr_time_failure(self):
727
        """Test array AACGMV2 calculation with a bad time"""