@@ -980,23 +980,23 @@ def test_arg_for_errors_in_astype_dictlist(self):
980
980
981
981
tm .assert_frame_equal (result , expected )
982
982
983
- def test_astype_ignores_arg (self ):
984
- # 30324
985
- df = pd .DataFrame ({"a" : [1 , 2 , 3 ]})
986
- df_validation = pd .DataFrame ({"a" : [1 , 2 , 3 ]})
987
-
988
- # Tests that a KeyError is raised when raise is explicitly declared
989
- with pytest .raises (KeyError ):
990
- df .astype ({"b" : str }, errors = "raise" )
991
-
992
- # Tests that a KeyError is raised when no argument is declared
993
- with pytest .raises (KeyError ):
994
- df .astype ({"b" : str })
995
-
996
- # Tests that no KeyError is thrown if ignore is true.
997
- # Ensures there is no change to the initial DataFrame.
998
- df .astype ({"b" : str }, errors = "ignore" )
999
- tm . assert_frame_equal ( df , df_validation )
983
+ def test_astype_ignores (self ):
984
+ # 30324
985
+ df = pd .DataFrame ({"a" : [1 , 2 , 3 ]})
986
+ df_validation = pd .DataFrame ({"a" : [1 , 2 , 3 ]})
987
+
988
+ # Tests that a KeyError is raised when raise is explicitly declared
989
+ with pytest .raises (KeyError ):
990
+ df .astype ({"b" : str }, errors = "raise" )
991
+
992
+ # Tests that a KeyError is raised when no argument is declared
993
+ with pytest .raises (KeyError ):
994
+ df .astype ({"b" : str })
995
+
996
+ # Tests that no KeyError is thrown if ignore is true.
997
+ # Ensures there is no change to the initial DataFrame.
998
+ df .astype ({"b" : str }, errors = "ignore" )
999
+ assert df . equals ( df_validation )
1000
1000
1001
1001
@pytest .mark .parametrize (
1002
1002
"input_vals" ,
0 commit comments