305386d063866fee9b2303bd9b29356bbf1f1bb2,tests/test_bql.py,,test_txn,#,862

Before Change


        bdb.execute("BEGIN")
        try:
            with open(fname, "rU") as f:
                read_csv.bayesdb_read_csv(bdb, "t", f, header=True,
                    create=True)
            bdb.execute("SELECT * FROM t")
            guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat")
            bdb.execute("ESTIMATE * FROM t_cc")
        finally:
            bdb.execute("ROLLBACK")
        with pytest.raises(sqlite3.OperationalError):
            bdb.execute("SELECT * FROM t")
        with pytest.raises(ValueError):
            bdb.execute("ESTIMATE * FROM t_cc")

        // Make sure CREATE and DROP both work in the transaction.
        bdb.execute("BEGIN")
        try:
            with open(fname, "rU") as f:
                read_csv.bayesdb_read_csv(bdb, "t", f, header=True,
                    create=True)
            bdb.execute("SELECT * FROM t")
            guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat")
            bdb.execute("ESTIMATE * FROM t_cc")
            with pytest.raises(ValueError):
                bdb.execute("DROP TABLE t")
            bdb.execute("DROP GENERATOR t_cc")
            with pytest.raises(ValueError):
                bdb.execute("ESTIMATE * FROM t_cc")
            bdb.execute("DROP TABLE t")
            with pytest.raises(sqlite3.OperationalError):
                bdb.execute("SELECT * FROM t")
        finally:
            bdb.execute("ROLLBACK")
        with pytest.raises(ValueError):
            bdb.execute("ESTIMATE * FROM t_cc")
        with pytest.raises(sqlite3.OperationalError):
            bdb.execute("SELECT * FROM t")

        // Make sure CREATE and DROP work even if we commit.
        bdb.execute("BEGIN")
        try:
            with open(fname, "rU") as f:
                read_csv.bayesdb_read_csv(bdb, "t", f, header=True,
                    create=True)
            bdb.execute("SELECT * FROM t")
            guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat")
            bdb.execute("ESTIMATE * FROM t_cc")
            with pytest.raises(ValueError):
                bdb.execute("DROP TABLE t")
            bdb.execute("DROP GENERATOR t_cc")
            with pytest.raises(ValueError):
                bdb.execute("ESTIMATE * FROM t_cc")
            bdb.execute("DROP TABLE t")
            with pytest.raises(sqlite3.OperationalError):
                bdb.execute("SELECT * FROM t")
        finally:
            bdb.execute("COMMIT")
        with pytest.raises(ValueError):
            bdb.execute("ESTIMATE * FROM t_cc")
        with pytest.raises(sqlite3.OperationalError):
            bdb.execute("SELECT * FROM t")

        // Make sure CREATE persists if we commit.
        bdb.execute("BEGIN")
        try:
            with open(fname, "rU") as f:
                read_csv.bayesdb_read_csv(bdb, "t", f, header=True,
                    create=True)
            bdb.execute("SELECT * FROM t")
            guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat")

After Change


        bdb.execute("BEGIN")
        try:
            with open(fname, "rU") as f:
                bayeslite.bayesdb_read_csv(bdb, "t", f, header=True,
                    create=True)
            bdb.execute("SELECT * FROM t")
            guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat")
            bdb.execute("ESTIMATE * FROM t_cc")
            with pytest.raises(ValueError):
                bdb.execute("DROP TABLE t")
            bdb.execute("DROP GENERATOR t_cc")
            with pytest.raises(ValueError):
                bdb.execute("ESTIMATE * FROM t_cc")
            bdb.execute("DROP TABLE t")
            with pytest.raises(sqlite3.OperationalError):
                bdb.execute("SELECT * FROM t")
        finally:
            bdb.execute("ROLLBACK")
        with pytest.raises(ValueError):
            bdb.execute("ESTIMATE * FROM t_cc")
        with pytest.raises(sqlite3.OperationalError):
            bdb.execute("SELECT * FROM t")

        // Make sure CREATE and DROP work even if we commit.
        bdb.execute("BEGIN")
        try:
            with open(fname, "rU") as f:
                bayeslite.bayesdb_read_csv(bdb, "t", f, header=True,
                    create=True)
            bdb.execute("SELECT * FROM t")
            guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat")
            bdb.execute("ESTIMATE * FROM t_cc")
            with pytest.raises(ValueError):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: probcomp/bayeslite
Commit Name: 305386d063866fee9b2303bd9b29356bbf1f1bb2
Time: 2015-03-24
Author: riastradh+probcomp@csail.mit.edu
File Name: tests/test_bql.py
Class Name:
Method Name: test_txn


Project Name: probcomp/bayeslite
Commit Name: 402856a858c691974286a72793a76ad37ef12095
Time: 2015-03-24
Author: riastradh+probcomp@csail.mit.edu
File Name: tests/test_bql.py
Class Name:
Method Name: test_txn


Project Name: probcomp/bayeslite
Commit Name: 305386d063866fee9b2303bd9b29356bbf1f1bb2
Time: 2015-03-24
Author: riastradh+probcomp@csail.mit.edu
File Name: tests/test_bql.py
Class Name:
Method Name: test_createtab


Project Name: probcomp/bayeslite
Commit Name: 305386d063866fee9b2303bd9b29356bbf1f1bb2
Time: 2015-03-24
Author: riastradh+probcomp@csail.mit.edu
File Name: tests/test_bql.py
Class Name:
Method Name: test_txn


Project Name: probcomp/bayeslite
Commit Name: 402856a858c691974286a72793a76ad37ef12095
Time: 2015-03-24
Author: riastradh+probcomp@csail.mit.edu
File Name: tests/test_bql.py
Class Name:
Method Name: test_createtab