Skip to content

Commit

Permalink
Fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimazest committed Nov 21, 2013
1 parent dadcf4f commit 932d69f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ def damsl_act_tag():
]


def test_write_cooccurrence_matrix_hd5(counter, output, utterances):
io.write_cooccurrence_matrix_hd5(counter, output, utterances)
@pytest.fixture
def metadata():
return {
'key': 'value',
'other key': 'other value',
}


def test_write_cooccurrence_matrix_hd5(counter, output, utterances, metadata):
io.write_cooccurrence_matrix_hd5(counter, output, utterances, metadata)

with pd.get_store(output) as store:

Expand All @@ -60,3 +68,5 @@ def test_write_cooccurrence_matrix_hd5(counter, output, utterances):
assert tuple(store['col_ids']) == tuple(col2id[c] for c in store['col_labels'])

assert tuple(store['data'].values) == (3, 4, 2, 1)

assert store.get_storer('data').attrs.metadata == metadata

0 comments on commit 932d69f

Please sign in to comment.