how to use BMesh to add verts, faces, and edges to existing geometry
The issue with this script is when you exit editmode, the editmesh you were editing becomes invalid (thats good, but not what you want).

So instead, just exit editmode and blender will handle converting the modified bmesh into the object mode mesh data.

import bpy, bmesh

obj = bpy.context.object
me = obj.data
bm = bmesh.from_edit_mesh(me)

v1 = bm.verts.new((2.0, 2.0, 2.0))
v2 = bm.verts.new((-2.0, 2.0, 2.0))
v3 = bm.verts.new((-2.0, -2.0, 2.0))

bm.faces.new((v1, v2, v3))

bmesh.update_edit_mesh(obj.data)

# This is optional, you could also stay in editmode.
bpy.ops.object.mode_set(mode='OBJECT')


Note, if you want to stay in editmode, call bmesh.update_edit_mesh(me) at the end of the script to ensure ngons are re-triangulated for display.