コード例 #1
0
def test_include_exclude():
    d = Dataset('data')
    d.include_('xiuxian*')
    data1 = d.compile()
    d = Dataset('data')
    d.include_reg_('set5')
    data2 = d.compile()
    d = Dataset('data').include_reg('set5').exclude('png')
    data3 = d.compile()

    assert len(data1) is 6
    assert len(data2) is 5
    assert len(data3) is 0
コード例 #2
0
    def test_include_exclude(self):
        d = Dataset('data')
        d.include_('xiuxian*')
        data1 = d.compile()
        d = Dataset('data')
        d.include_reg_('set5')
        data2 = d.compile()
        d = Dataset('data').include_reg('set5').exclude('png')
        data3 = d.compile()

        self.assertEqual(len(data1), 6)
        self.assertEqual(len(data2), 5)
        self.assertEqual(len(data3), 0)