code: def test_astype_unitless_dt64_raises(self):
      # GH#47844
      ser = Series(
          ["1970-01-01", "1970-01-01", "1970-01-01"],
          dtype="datetime64[ns]",
      )
      df = ser.to_frame()
  
      msg = "Casting to unit-less dtype 'datetime64' is not supported"
      with pytest.raises(TypeError, match=msg):
          ser.astype(np.datetime64)
      with pytest.raises(TypeError, match=msg):
          df.astype(np.datetime64)
      with pytest.raises(TypeError, match=msg):
          ser.astype("datetime64")
      with pytest.raises(TypeError, match=msg):
          df.astype("datetime64")
  
imports: from datetime import datetime, timedelta
  from importlib import reload
  import string
  import sys
  import numpy
  import pytest
  from pandas._libs.tslibs import iNaT
  import pandas.util._test_decorators
  from pandas import NA, Categorical, CategoricalDtype, DatetimeTZDtype, Index, Interval, NaT, Series, Timedelta, Timestamp, cut, date_range, to_datetime
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestAstypeAPI obj's underlying member method code with example usage: obj.test_astype_unitless_dt64_raises() without return types