docstr: Tests if the `fit()` method returns `self`. This allows to quickly implement one-liners with AutoML
docstr_tok: ["Tests","if","the","`","fit","(",")","`","method","returns","`","self","`",".","This","allows","to","quickly","implement","one-liners","with","AutoML"]
code: def test_fit_returns_self(self):
      """Tests if the `fit()` method returns `self`. This allows to quickly implement one-liners with AutoML"""
      model = AutoML()
      model.results_path = self.automl_dir
      self.assertTrue(
          isinstance(model.fit(iris.data, iris.target), AutoML),
          "`fit()` method must return 'self'",
      )
  
imports: import os
  import unittest
  import tempfile
  import json
  import numpy
  import pandas
  import shutil
  from sklearn import datasets
  from sklearn.pipeline import make_pipeline
  from sklearn.decomposition import PCA
  from supervised import AutoML
  from supervised.exceptions import AutoMLException
label_desc: Use image node_id 16 for calling the AutoMLTest obj's underlying member method code with example usage: obj.test_fit_returns_self() without return types