|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
-import osex
|
|
|
+import osex.locate
|
|
|
|
|
|
import os
|
|
|
|
|
@@ -16,9 +16,9 @@ def test_local_db_files(tmpdir):
|
|
|
os.makedirs(os.path.join('dir', 'subdir2'))
|
|
|
|
|
|
database_path = os.path.join(test_dir_path, 'db')
|
|
|
- osex.update_locate_database(database_path = database_path, root_path = test_dir_path, require_visibility = False)
|
|
|
+ osex.locate.update_locate_database(database_path = database_path, root_path = test_dir_path, require_visibility = False)
|
|
|
|
|
|
- results = osex.locate(
|
|
|
+ results = osex.locate.locate(
|
|
|
[test_dir_path + '*file*'],
|
|
|
database_path = database_path
|
|
|
)
|
|
@@ -36,9 +36,9 @@ def test_local_db_files_unicode(tmpdir):
|
|
|
open(u'file-ß', 'w').close()
|
|
|
|
|
|
database_path = os.path.join(test_dir_path, 'db')
|
|
|
- osex.update_locate_database(database_path = database_path, root_path = test_dir_path, require_visibility = False)
|
|
|
+ osex.locate.update_locate_database(database_path = database_path, root_path = test_dir_path, require_visibility = False)
|
|
|
|
|
|
- results = osex.locate(
|
|
|
+ results = osex.locate.locate(
|
|
|
[test_dir_path + '*file*'],
|
|
|
database_path = database_path
|
|
|
)
|
|
@@ -59,9 +59,9 @@ def test_local_db_dirs(tmpdir):
|
|
|
os.makedirs(os.path.join('dir', 'subdir2'))
|
|
|
|
|
|
database_path = os.path.join(test_dir_path, 'db')
|
|
|
- osex.update_locate_database(database_path = database_path, root_path = test_dir_path, require_visibility = False)
|
|
|
+ osex.locate.update_locate_database(database_path = database_path, root_path = test_dir_path, require_visibility = False)
|
|
|
|
|
|
- results = osex.locate(
|
|
|
+ results = osex.locate.locate(
|
|
|
[test_dir_path + '*dir*'],
|
|
|
database_path = database_path
|
|
|
)
|
|
@@ -81,13 +81,13 @@ def test_local_db_subtree(tmpdir):
|
|
|
os.makedirs(os.path.join('dir2', 'subdir4'))
|
|
|
|
|
|
database_path = os.path.join(test_dir_path, 'db')
|
|
|
- osex.update_locate_database(
|
|
|
+ osex.locate.update_locate_database(
|
|
|
database_path = database_path,
|
|
|
root_path = os.path.join(test_dir_path, 'dir2'),
|
|
|
require_visibility = False
|
|
|
)
|
|
|
|
|
|
- results = osex.locate(
|
|
|
+ results = osex.locate.locate(
|
|
|
[test_dir_path + '*subdir*'],
|
|
|
database_path = database_path
|
|
|
)
|