Skip to content

Commit

Permalink
adding test for new git repo metadata collection
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Apr 24, 2018
1 parent 03de969 commit 0545912
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_io.py
Expand Up @@ -65,6 +65,24 @@ def test_write_read(self):

self.assertTrue(self.kb.is_equal(kb))

def test_write_with_repo_md(self):
_, core_path = tempfile.mkstemp(suffix='.xlsx', dir='.')
_, seq_path = tempfile.mkstemp(suffix='.fna', dir='.')

self.assertEqual(self.kb.url, '')

writer = io.Writer()
writer.run(self.kb, core_path, seq_path, set_repo_metadata_from_path=True)

self.assertIn(self.kb.url, [
'https://github.com/KarrLab/wc_kb.git',
'ssh://git@github.com/KarrLab/wc_kb.git',
'git@github.com:KarrLab/wc_kb.git',
])

os.remove(core_path)
os.remove(seq_path)

def test_write_without_cell_relationships(self):
core_path = os.path.join(self.dir, 'core.xlsx')
seq_path = os.path.join(self.dir, 'seq.fna')
Expand Down

0 comments on commit 0545912

Please sign in to comment.