Exemplo n.º 1
0
 def test_find_regex(self):
     buffer = locatedb.find('__init__.py', ignore_case=False, limit=2, regex='/home/plasmashadow/.PyCharm40/system/python_stubs/-1235803962/Crypto/Cipher/*')
     str_list = buffer.getvalue().split("\n")
     log.info(str_list)
     self.assertEqual(len(str_list), 1)
Exemplo n.º 2
0
 def test_find(self):
     buffer = locatedb.find('__init__.py', ignore_case=False, limit=2)
     str_list = buffer.getvalue().split("\n")
     log.info(str_list)
     self.assertEqual(len(str_list), 2)
Exemplo n.º 3
0
 def test_find(self):
     buffer = locatedb.find('fstab', ignore_case=False, limit=2)
     str_list = buffer.getvalue().split("\n")
     log.info(str_list)
     self.assertEqual(len(str_list), 2)
Exemplo n.º 4
0
 def test_find_regex(self):
     buffer = locatedb.find('py', ignore_case=False, regex='.*\.py')
     str_list = buffer.getvalue().split("\n")
     self.assertIsNotNone(str_list)
Exemplo n.º 5
0
 def test_find_regex(self):
     self._assert_is_in(
         'barstuff.py',
         locatedb.find('py', ignore_case=False, regex=r'.*.py$',
                       db_path='/tmp/fixed.db'))