示例#1
0
    def test_count_samples(self):
        test_mapping = [
            "#SampleID\tfoo\tbar", "A\t1\t2", "B\t1\t3", "C\t2\t4", "D\t3\t5",
            "E\t2\t6"
        ]
        obs = count_samples(iter(test_mapping))
        exp = 5
        self.assertEqual(obs, exp)

        obs = count_samples(iter(test_mapping), criteria={'foo': '2'})
        exp = 2
示例#2
0
    def test_count_samples(self):
        test_mapping = ["#SampleID\tfoo\tbar",
                        "A\t1\t2",
                        "B\t1\t3",
                        "C\t2\t4",
                        "D\t3\t5",
                        "E\t2\t6"]
        obs = count_samples(iter(test_mapping))
        exp = 5
        self.assertEqual(obs, exp)

        obs = count_samples(iter(test_mapping), criteria={'foo': '2'})
        exp = 2