code: def test_add_column_string(df):
      """Checks `add_column` works as expected when adding a string scalar
      to the column.
  
      And ensure no errors are raised. The error checks on iterables should
      exclude strings, which also have a length.
      """
      df = df.add_column("fortythousand", "test string")
      series = pd.Series(["test string" for _ in range(len(df))])
      series.name = "fortythousand"
      assert_series_equal(df["fortythousand"], series)
  
      # values are correct in dataframe for iterable
      vals = np.linspace(0, 43, len(df))
      df = df.add_column("fortythree", vals)
      series = pd.Series(vals)
      series.name = "fortythree"
      assert_series_equal(df["fortythree"], series)
  
file_path: pyjanitor/tests/functions/test_add_column.py
imports: import numpy
  import pandas
  import pytest
  from hypothesis import given, settings
  from hypothesis import strategies
  from pandas.testing import assert_series_equal
  from janitor.testing_utils.strategies import df_strategy
label_desc: Use image node_id 6 for calling a global function with example usage: test_add_column_string(df) without return types