code: def test_astype_invalid_conversion(self):
      # GH#47571
      df = DataFrame({"a": [1, 2, "text"], "b": [1, 2, 3]})
  
      msg = (
          "invalid literal for int() with base 10: 'text': "
          "Error while type casting for column 'a'"
      )
  
      with pytest.raises(ValueError, match=re.escape(msg)):
          df.astype({"a": int})
  
imports: import re
  import numpy
  import pytest
  import pandas.util._test_decorators
  import pandas
  from pandas import Categorical, CategoricalDtype, DataFrame, DatetimeTZDtype, Index, Interval, IntervalDtype, NaT, Series, Timedelta, Timestamp, concat, date_range, option_context
  import pandas._testing
label_desc: Use image node_id 28 for calling the TestAstype obj's underlying member method code with example usage: obj.test_astype_invalid_conversion() without return types