From b379c6328416721d22fe5d94984b36258ad8f35b Mon Sep 17 00:00:00 2001
From: Xavier Claessens <xavier.claessens@collabora.com>
Date: Wed, 23 Sep 2015 14:10:34 -0400
Subject: [PATCH] tracker: move common.py into apertis_tests_lib

Reviewers: smcv, pwith

Differential Revision: https://phabricator.apertis.org/D541
---
 apertis_tests_lib/__init__.py                     | 9 +++++++++
 tracker/common.py => apertis_tests_lib/tracker.py | 0
 tracker/automated/test-tracker.py                 | 9 +++++----
 tracker/manual/test-removable-device.py           | 7 ++++---
 4 files changed, 18 insertions(+), 7 deletions(-)
 create mode 100644 apertis_tests_lib/__init__.py
 rename tracker/common.py => apertis_tests_lib/tracker.py (100%)

diff --git a/apertis_tests_lib/__init__.py b/apertis_tests_lib/__init__.py
new file mode 100644
index 0000000..9e2f0e7
--- /dev/null
+++ b/apertis_tests_lib/__init__.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+
+# Copyright © 2015 Collabora Ltd.
+#
+# SPDX-License-Identifier: MPL-2.0
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
diff --git a/tracker/common.py b/apertis_tests_lib/tracker.py
similarity index 100%
rename from tracker/common.py
rename to apertis_tests_lib/tracker.py
diff --git a/tracker/automated/test-tracker.py b/tracker/automated/test-tracker.py
index f09e4b0..f823da4 100755
--- a/tracker/automated/test-tracker.py
+++ b/tracker/automated/test-tracker.py
@@ -17,10 +17,11 @@ from gi.repository import GLib
 from gi.repository import Gio
 from gi.repository import Grl
 
-# import from parent directory
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
-from common import TrackerIndexer
-from common import LONG_JPEG_NAME
+# import from toplevel directory
+sys.path.insert(0, os.path.join(os.path.dirname(__file__),
+                                os.pardir, os.pardir))
+from apertis_tests_lib.tracker import TrackerIndexer
+from apertis_tests_lib.tracker import LONG_JPEG_NAME
 
 
 class TrackerTest(unittest.TestCase):
diff --git a/tracker/manual/test-removable-device.py b/tracker/manual/test-removable-device.py
index 41380d9..5f412e3 100755
--- a/tracker/manual/test-removable-device.py
+++ b/tracker/manual/test-removable-device.py
@@ -15,9 +15,10 @@ import os
 from gi.repository import GLib
 from gi.repository import Gio
 
-# import from parent directory
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
-from common import TrackerIndexer
+# import from toplevel directory
+sys.path.insert(0, os.path.join(os.path.dirname(__file__),
+                                os.pardir, os.pardir))
+from apertis_tests_lib.tracker import TrackerIndexer
 
 
 class TestRemovableDevice(unittest.TestCase):
-- 
GitLab