def test_instance_count(self): locate_obj = locatedb() buffer = locate_obj.count('__init__.py') log.info(buffer) self.assertIsNotNone(buffer)
def create_obj(self): locate_obj = locatedb(db_path=self.test_file)
def test_instance_find(self): locate_obj = locatedb() buffer = locate_obj.find('__init__.py', ignore_case=False, limit=2) str_list = buffer.getvalue().split("\n") log.info(str_list) self.assertEqual(len(str_list), 2)
def test_instance_count(self): locate_obj = locatedb() buffer = locate_obj.count('fstab') log.info(buffer) self.assertIsNotNone(buffer)
def test_instance_find(self): locate_obj = locatedb() buffer = locate_obj.find('fstab', ignore_case=False, limit=2) str_list = buffer.getvalue().split("\n") log.info(str_list) self.assertEqual(len(str_list), 2)
def test_instance_count(self): self.assertEqual(locatedb(db_path='/tmp/fixed.db').count('foobar'), 1)
def test_instance_find(self): self._assert_is_in( 'foobar', locatedb(db_path="/tmp/fixed.db").find('foobar'))
def test_find(self): self._assert_is_in('foobar', locatedb(db_path='/tmp/fixed.db').find( 'foobar', ignore_case=False, limit=2))