[tracker/sam/functional-tests-shared: 19/21] functional-tests: Merge common/utils package into the tests themselves



commit 7121e6f1e60a0e45ef1d12775aa56e58a7507284
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Aug 14 16:20:59 2019 +0200

    functional-tests: Merge common/utils package into the tests themselves
    
    This package now contains just a few files, as most of the code has
    moved to the utils/trackertestutils package. Let's take the opportunity
    to simplify the directory structure.

 tests/functional-tests/01-insertion.py                       | 2 +-
 tests/functional-tests/02-sparql-bugs.py                     | 2 +-
 tests/functional-tests/03-fts-functions.py                   | 2 +-
 tests/functional-tests/04-group-concat.py                    | 2 +-
 tests/functional-tests/05-coalesce.py                        | 2 +-
 tests/functional-tests/06-distance.py                        | 2 +-
 tests/functional-tests/07-graph.py                           | 2 +-
 tests/functional-tests/08-unique-insertions.py               | 2 +-
 tests/functional-tests/09-concurrent-query.py                | 2 +-
 tests/functional-tests/10-sqlite-misused.py                  | 4 ++--
 tests/functional-tests/11-sqlite-batch-misused.py            | 4 ++--
 tests/functional-tests/13-threaded-store.py                  | 4 ++--
 tests/functional-tests/14-signals.py                         | 2 +-
 tests/functional-tests/15-statistics.py                      | 2 +-
 tests/functional-tests/16-collation.py                       | 2 +-
 tests/functional-tests/17-ontology-changes.py                | 6 +++---
 tests/functional-tests/common/__init__.py                    | 1 -
 tests/functional-tests/common/utils/__init__.py              | 1 -
 tests/functional-tests/{common/utils => }/configuration.py   | 0
 tests/functional-tests/{common/utils => }/expectedFailure.py | 6 ++++--
 tests/functional-tests/{common/utils => }/storetest.py       | 2 +-
 21 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/tests/functional-tests/01-insertion.py b/tests/functional-tests/01-insertion.py
index 180bca5d3..b723fd4b6 100755
--- a/tests/functional-tests/01-insertion.py
+++ b/tests/functional-tests/01-insertion.py
@@ -28,7 +28,7 @@ import random
 import datetime
 
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TrackerStoreInsertionTests (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/02-sparql-bugs.py b/tests/functional-tests/02-sparql-bugs.py
index c5f23674f..6ee420926 100755
--- a/tests/functional-tests/02-sparql-bugs.py
+++ b/tests/functional-tests/02-sparql-bugs.py
@@ -24,7 +24,7 @@ Peculiar Sparql behavour reported in bugs
 from gi.repository import GLib
 
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/03-fts-functions.py b/tests/functional-tests/03-fts-functions.py
index df2668b22..5edcef422 100755
--- a/tests/functional-tests/03-fts-functions.py
+++ b/tests/functional-tests/03-fts-functions.py
@@ -23,7 +23,7 @@ These tests use only the store. They insert instances with known text
 and run sparql with fts functions to check the results.
 """
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TestFTSFunctions (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/04-group-concat.py b/tests/functional-tests/04-group-concat.py
index 3ae53239a..ad000b5ae 100755
--- a/tests/functional-tests/04-group-concat.py
+++ b/tests/functional-tests/04-group-concat.py
@@ -21,7 +21,7 @@
 Test the GROUP_CONCAT function in Sparql. Only requires the store.
 """
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TestGroupConcat (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/05-coalesce.py b/tests/functional-tests/05-coalesce.py
index a9ef15aab..837a76fec 100755
--- a/tests/functional-tests/05-coalesce.py
+++ b/tests/functional-tests/05-coalesce.py
@@ -21,7 +21,7 @@
 Test tracker:coalesce function in Sparql. Only uses the Store
 """
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TestCoalesce (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/06-distance.py b/tests/functional-tests/06-distance.py
index 52191559f..aa28465e2 100755
--- a/tests/functional-tests/06-distance.py
+++ b/tests/functional-tests/06-distance.py
@@ -21,7 +21,7 @@
 Test the distance-calculation functions in Sparql. Only requires the Store
 """
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 POINT_COORDS = [
     (0, 0), (1, 1), (2, 2), (3, 3), (4, 4)
diff --git a/tests/functional-tests/07-graph.py b/tests/functional-tests/07-graph.py
index 03366fd30..3006ef587 100755
--- a/tests/functional-tests/07-graph.py
+++ b/tests/functional-tests/07-graph.py
@@ -21,7 +21,7 @@
 Tests graphs in Sparql. Only requires the store.
 """
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TestGraphs (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/08-unique-insertions.py b/tests/functional-tests/08-unique-insertions.py
index 23650231f..e9ce03d15 100755
--- a/tests/functional-tests/08-unique-insertions.py
+++ b/tests/functional-tests/08-unique-insertions.py
@@ -21,7 +21,7 @@
 Replicate the behaviour of the miner inserting information in the store.
 """
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TestMinerInsertBehaviour (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/09-concurrent-query.py b/tests/functional-tests/09-concurrent-query.py
index f362dc98d..05093847e 100755
--- a/tests/functional-tests/09-concurrent-query.py
+++ b/tests/functional-tests/09-concurrent-query.py
@@ -23,7 +23,7 @@ Send concurrent inserts and queries to the daemon to check the concurrency.
 from gi.repository import GLib
 
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 AMOUNT_OF_TEST_INSTANCES = 100
 AMOUNT_OF_QUERIES = 10
diff --git a/tests/functional-tests/10-sqlite-misused.py b/tests/functional-tests/10-sqlite-misused.py
index cb0a7cec2..e68fd1779 100755
--- a/tests/functional-tests/10-sqlite-misused.py
+++ b/tests/functional-tests/10-sqlite-misused.py
@@ -24,9 +24,9 @@ some SQLITE_MISUSED errors before.
 import os
 from gi.repository import GLib
 
-from common.utils import configuration as cfg
+import configuration as cfg
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TestSqliteMisused (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/11-sqlite-batch-misused.py 
b/tests/functional-tests/11-sqlite-batch-misused.py
index fad38ba19..68d229c81 100755
--- a/tests/functional-tests/11-sqlite-batch-misused.py
+++ b/tests/functional-tests/11-sqlite-batch-misused.py
@@ -24,9 +24,9 @@ some SQLITE_MISUSED errors before.
 import os
 from gi.repository import GLib
 
-from common.utils import configuration as cfg
+import configuration as cfg
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 # Number of instances per batch
 BATCH_SIZE = 3000
diff --git a/tests/functional-tests/13-threaded-store.py b/tests/functional-tests/13-threaded-store.py
index d3fb88023..40d4cef71 100755
--- a/tests/functional-tests/13-threaded-store.py
+++ b/tests/functional-tests/13-threaded-store.py
@@ -25,9 +25,9 @@ import os
 from gi.repository import GLib
 import time
 
-from common.utils import configuration as cfg
+import configuration as cfg
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 MAX_TEST_TIME = 60  # seconds to finish the tests (to avoid infinite waitings)
 
diff --git a/tests/functional-tests/14-signals.py b/tests/functional-tests/14-signals.py
index 658cf6ca5..d846265b4 100755
--- a/tests/functional-tests/14-signals.py
+++ b/tests/functional-tests/14-signals.py
@@ -29,7 +29,7 @@ from gi.repository import GLib
 import time
 import unittest as ut
 
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 GRAPH_UPDATED_SIGNAL = "GraphUpdated"
diff --git a/tests/functional-tests/15-statistics.py b/tests/functional-tests/15-statistics.py
index ac6a2f210..279561098 100755
--- a/tests/functional-tests/15-statistics.py
+++ b/tests/functional-tests/15-statistics.py
@@ -25,7 +25,7 @@ are updated when different operations are executed on the store
 import time
 
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 RDFS_RESOURCE = "rdfs:Resource"
 NIE_IE = "nie:InformationElement"
diff --git a/tests/functional-tests/16-collation.py b/tests/functional-tests/16-collation.py
index 36a1fbbc7..d43e553c2 100755
--- a/tests/functional-tests/16-collation.py
+++ b/tests/functional-tests/16-collation.py
@@ -27,7 +27,7 @@ import random
 import locale
 
 import unittest as ut
-from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
+from storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
 
 
 class TrackerStoreCollationTests (CommonTrackerStoreTest):
diff --git a/tests/functional-tests/17-ontology-changes.py b/tests/functional-tests/17-ontology-changes.py
index d180f2585..5b017a008 100755
--- a/tests/functional-tests/17-ontology-changes.py
+++ b/tests/functional-tests/17-ontology-changes.py
@@ -31,13 +31,13 @@ import shutil
 import re
 import tempfile
 import time
+import unittest as ut
 
 import trackertestutils.dconf
 import trackertestutils.helpers
 
-from common.utils import configuration as cfg
-from common.utils.expectedFailure import expectedFailureJournal
-import unittest as ut
+import configuration as cfg
+from expectedFailure import expectedFailureJournal
 
 
 RDFS_RANGE = "http://www.w3.org/2000/01/rdf-schema#range";
diff --git a/tests/functional-tests/common/utils/configuration.py b/tests/functional-tests/configuration.py
similarity index 100%
rename from tests/functional-tests/common/utils/configuration.py
rename to tests/functional-tests/configuration.py
diff --git a/tests/functional-tests/common/utils/expectedFailure.py 
b/tests/functional-tests/expectedFailure.py
similarity index 97%
rename from tests/functional-tests/common/utils/expectedFailure.py
rename to tests/functional-tests/expectedFailure.py
index e7f0eb68c..591924f01 100644
--- a/tests/functional-tests/common/utils/expectedFailure.py
+++ b/tests/functional-tests/expectedFailure.py
@@ -25,9 +25,11 @@
 Write values in tracker and check the actual values are written
 on the files. Note that these tests are highly platform dependant.
 """
-import sys
+
 from functools import wraps
-import common.utils.configuration as cfg
+import sys
+
+import configuration as cfg
 
 
 def expectedFailureJournal():
diff --git a/tests/functional-tests/common/utils/storetest.py b/tests/functional-tests/storetest.py
similarity index 96%
rename from tests/functional-tests/common/utils/storetest.py
rename to tests/functional-tests/storetest.py
index 06ef3e0d0..adc562570 100644
--- a/tests/functional-tests/common/utils/storetest.py
+++ b/tests/functional-tests/storetest.py
@@ -24,7 +24,7 @@ import time
 import unittest as ut
 
 import trackertestutils.helpers
-from common.utils import configuration as cfg
+import configuration as cfg
 
 
 class CommonTrackerStoreTest (ut.TestCase):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]