code: def test_sframe_equals(self):
      # Empty SFrames should be equal
      sf_a = SFrame()
      sf_b = SFrame()
  
      glutil._assert_sframe_equal(sf_a, sf_b)
  
      the_data = [i for i in range(0, 10)]
      sf = SFrame()
      sf["ints"] = SArray(data=the_data, dtype=int)
      sf["floats"] = SArray(data=the_data, dtype=float)
      sf["floats"] = sf["floats"] * 0.5
      sf["strings"] = SArray(data=the_data, dtype=str)
      sf["strings"] = sf["strings"].apply(lambda x: x + x + x)
  
      # Make sure these aren't pointing to the same SFrame
      sf_a = sf.filter_by([43], "ints", exclude=True)
      sf_b = sf.filter_by([43], "ints", exclude=True)
  
      glutil._assert_sframe_equal(sf_a, sf_b)
  
      # Difference in number of columns
      sf_a["extra"] = SArray(data=the_data)
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      del sf_a["extra"]
      glutil._assert_sframe_equal(sf_a, sf_b)
  
      # Difference in number of rows
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b[0:5])
  
      # Difference in types
      sf_a["diff_type"] = sf_a["ints"].astype(str)
      sf_b["diff_type"] = sf_b["ints"]
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      del sf_a["diff_type"]
      del sf_b["diff_type"]
      glutil._assert_sframe_equal(sf_a, sf_b)
  
      # Difference in column name
      sf_a.rename({"strings": "string"}, inplace=True)
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      glutil._assert_sframe_equal(sf_a, sf_b, check_column_names=False)
  
      sf_a.rename({"string": "strings"}, inplace=True)
      glutil._assert_sframe_equal(sf_a, sf_b)
  
      sf_a.rename({"ints": "floats1"}, inplace=True)
      sf_a.rename({"floats": "ints"}, inplace=True)
      sf_a.rename({"floats1": "floats"}, inplace=True)
      glutil._assert_sframe_equal(sf_a, sf_b, check_column_names=False)
  
      sf_a = sf.filter_by([43], "ints", exclude=True)
  
      # Difference in column order
      sf_a.swap_columns("strings", "ints", inplace=True)
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      glutil._assert_sframe_equal(sf_a, sf_b, check_column_order=False)
  
      sf_a.swap_columns("strings", "ints", inplace=True)
      glutil._assert_sframe_equal(sf_a, sf_b)
  
      # Difference in row order
      sf_a = sf_a.append(sf[0:5])
      sf_b = sf[0:5].append(sf_b)
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      glutil._assert_sframe_equal(sf_a, sf_b, check_row_order=False)
  
      # Difference in column order AND row order
      sf_a.swap_columns("floats", "strings", inplace=True)
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      glutil._assert_sframe_equal(
          sf_a, sf_b, check_column_order=False, check_row_order=False
      )
  
      # Column order, row order, names
      sf_a.rename(
          {"floats": "foo", "strings": "bar", "ints": "baz"},
          inplace=True,
      )
      with self.assertRaises(AssertionError):
          glutil._assert_sframe_equal(sf_a, sf_b)
  
      # Illegal stuff
      with self.assertRaises(ValueError):
          glutil._assert_sframe_equal(
              sf_a,
              sf_b,
              check_column_names=False,
              check_column_order=False,
          )
  
      with self.assertRaises(ValueError):
          glutil._assert_sframe_equal(
              sf_a,
              sf_b,
              check_column_names=False,
              check_column_order=False,
              check_row_order=False,
          )
  
      with self.assertRaises(TypeError):
          glutil._assert_sframe_equal(sf_b["floats"], sf_a["foo"])
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import os
  import unittest
  import tempfile
  import shutil
  import uuid
  import sys
  from ..None import util
  from ..None import SFrame, SArray, SGraph
  from ..util import get_turicreate_object_type
  from ..config import get_runtime_config, set_runtime_config
  from .None import util
  import pytest
label_desc: Use image node_id 5 for calling the UtilTests obj's underlying member method code with example usage: obj.test_sframe_equals() without return types