docstr: target: test table delete apis
  method:
  1. create tables
      - 'table_3'
          - c1 int primary key
          - c2 int
          - c3 int
  2. insert
      - (1, 10, 100)
      - (2, 20, 200)
      - (3, 30, 300)
      - (4, 40, 400)
  3. delete
      - delete from table_3 where c1 = 1
      - after:
          - (2, 20, 200)
          - (3, 30, 300)
          - (4, 40, 400)
      - delete from table_3
      - after: empty
  4. drop tables
      - 'table_3'
  expect: all operations successfully
docstr_tok: ["target",":","test","table","delete","apis","method",":","1.","create","tables","-","'table_3'","-","c1","int","primary","key","-","c2","int","-","c3","int","2.","insert","-","(","1",",","10",",","100",")","-","(","2",",","20",",","200",")","-","(","3",",","30",",","300",")","-","(","4",",","40",",","400",")","3.","delete","-","delete","from","table_3","where","c1","=","1","-","after",":","-","(","2",",","20",",","200",")","-","(","3",",","30",",","300",")","-","(","4",",","40",",","400",")","-","delete","from","table_3","-","after",":","empty","4.","drop","tables","-","'table_3'","expect",":","all","operations","successfully"]
code: def test_delete(self):
      """
      target: test table delete apis
      method:
      1. create tables
          - 'table_3'
              - c1 int primary key
              - c2 int
              - c3 int
      2. insert
          - (1, 10, 100)
          - (2, 20, 200)
          - (3, 30, 300)
          - (4, 40, 400)
      3. delete
          - delete from table_3 where c1 = 1
          - after:
              - (2, 20, 200)
              - (3, 30, 300)
              - (4, 40, 400)
          - delete from table_3
          - after: empty
      4. drop tables
          - 'table_3'
      expect: all operations successfully
      """
      infinity_obj = infinity.connect(REMOTE_HOST)
      db_obj = infinity_obj.get_database("default")
  
      # infinity
      db_obj.drop_table(table_name="table_3", if_exists=True)
      res = db_obj.create_table(
          "table_3",
          {
              "c1": "int, primary key, not null",
              "c2": "int",
              "c3": "int",
          },
          None,
      )
  
      table_obj = db_obj.get_table("table_3")
  
      res = table_obj.insert(
          [
              {"c1": 1, "c2": 10, "c3": 100},
              {"c1": 2, "c2": 20, "c3": 200},
              {"c1": 3, "c2": 30, "c3": 300},
              {"c1": 4, "c2": 40, "c3": 400},
          ]
      )
      assert res.success
  
      res = table_obj.delete("c1 = 1")
      assert res.success
  
      res = table_obj.output(["*"]).to_df()
      pd.testing.assert_frame_equal(
          res,
          pd.DataFrame(
              {
                  "c1": (2, 3, 4),
                  "c2": (20, 30, 40),
                  "c3": (200, 300, 400),
              }
          ).astype(
              {
                  "c1": dtype("int32"),
                  "c2": dtype("int32"),
                  "c3": dtype("int32"),
              }
          ),
      )
  
      res = table_obj.delete()
      assert res.success
  
      res = table_obj.output(["*"]).to_df()
      pd.testing.assert_frame_equal(
          res,
          pd.DataFrame({"c1": (), "c2": (), "c3": ()}).astype(
              {
                  "c1": dtype("int32"),
                  "c2": dtype("int32"),
                  "c3": dtype("int32"),
              }
          ),
      )
  
      res = db_obj.drop_table("table_3")
      assert res.success
  
      # disconnect
      res = infinity_obj.disconnect()
  
      assert res.success
  
imports: import pandas
  from numpy import dtype
  import infinity
  from infinity.common import NetworkAddress, REMOTE_HOST
label_desc: Use image node_id 2 for calling the TestDelete obj's underlying member method code with example usage: obj.test_delete() without return types