Ignore emacs backup files of tsvs in addition to python files
[helpful_scripts.git] / test_translate_tsv_genes.py
1 #!/usr/bin/python3
2
3 from unittest import TestCase
4 from translate_tsv_genes import load_matrixes
5
6
7 class TestTranslateTSV(TestCase):
8     def test_load_matrix(self):
9         """Make sure we create a matrix indexed by the union of ids
10         """
11         m = load_matrixes(['test/m1.tsv', 'test/m2.tsv'], 'FPKM')
12         self.assertEqual(m.shape, (9, 2))
13         self.assertEqual(list(m.index),
14                          ['a', 'b', 'c', 'd', 'e', 'f', 'x', 'y', 'z'])
15         self.assertEqual(list(m.keys()), ['m1.tsv', 'm2.tsv'])