Skip to content

Commit

Permalink
No more xfail for one-column tests.
Browse files Browse the repository at this point in the history
Fixes Github issue #31.  Requires Crosscat 0.1.9.

Dynamically ascertaining whether these tests should fail based on the
Crosscat version was too much trouble to implement.
  • Loading branch information
riastradh-probcomp committed Jun 5, 2015
1 parent 4ce8589 commit 9e87fc5
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def data(_bdb):
def t0_schema(bdb):
bdb.sql_execute('create table t0 (id integer primary key, n integer)')
def t0_data(bdb):
for row in [(0, 0), (1, 1), (42, 42)]:
for row in [(0, 0), (1, 1), (2, 42), (3, 87)]:
bdb.sql_execute('insert into t0 (id, n) values (?, ?)', row)

def t0():
Expand Down Expand Up @@ -397,9 +397,8 @@ def test_t1_simulate(colnos, constraints, numpredictions):
for exname in examples.keys()
for colno in range(1,3)])
def test_onecolumn(exname, colno):
if exname == 't0':
# XXX Also too few columns for this test.
pytest.xfail("Crosscat can't handle a table with only one column.")
if exname == 't0' and colno > 0:
pytest.skip('Not enough columns in %s.' % (exname,))
if exname.startswith('t1_sub') and colno > 1:
pytest.skip('Not enough columns in %s.' % (exname,))
with analyzed_bayesdb_generator(examples[exname](), 1, 1) \
Expand All @@ -414,8 +413,6 @@ def test_onecolumn(exname, colno):
for colno0 in range(1,3)
for colno1 in range(1,3)])
def test_twocolumn(exname, colno0, colno1):
if exname == 't0':
pytest.xfail("Crosscat can't handle a table with only one column.")
if exname == 't0':
pytest.skip('Not enough columns in t0.')
if exname.startswith('t1_sub') and (colno0 > 1 or colno1 > 1):
Expand Down Expand Up @@ -473,9 +470,7 @@ def test_t1_column_value_probability(colno, rowid):
for target in range(2,4)
for colnos in powerset(range(1,3))])
def test_row_similarity(exname, source, target, colnos):
if exname == 't0':
pytest.xfail("Crosscat can't handle a table with only one column.")
if exname == 't0' and colnos != [] and colnos != [0]:
if exname == 't0' and any(colno > 0 for colno in colnos):
pytest.skip('Not enough columns in t0.')
if exname.startswith('t1_sub') and any(colno > 1 for colno in colnos):
pytest.skip('Not enough columns in %s.' % (exname,))
Expand All @@ -492,8 +487,6 @@ def test_row_similarity(exname, source, target, colnos):
for exname in examples.keys()
for rowid in range(4)])
def test_row_typicality(exname, rowid):
if exname == 't0':
pytest.xfail("Crosscat can't handle a table with only one column.")
if exname == 't0' and colnos != [] and colnos != [0]:
pytest.skip('Not enough columns in t0.')
with analyzed_bayesdb_generator(examples[exname](), 1, 1) \
Expand All @@ -509,8 +502,6 @@ def test_row_typicality(exname, rowid):
for rowid in range(4)
for colno in range(1,3)])
def test_row_column_predictive_probability(exname, rowid, colno):
if exname == 't0':
pytest.xfail("Crosscat can't handle a table with only one column.")
if exname == 't0' and colnos != [] and colnos != [0]:
pytest.skip('Not enough columns in t0.')
if exname.startswith('t1_sub') and any(colno > 1 for colno in colnos):
Expand Down

0 comments on commit 9e87fc5

Please sign in to comment.