[tracker/sam/functional-test-runner: 2/15] functional-tests: Remove unittest2, go back to built-in unittest module
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-test-runner: 2/15] functional-tests: Remove unittest2, go back to built-in unittest module
- Date: Tue, 30 Dec 2014 21:20:48 +0000 (UTC)
commit 12ecde0d3b0450a201b04fd0a636ac02255d1f76
Author: Sam Thursfield <sam afuera me uk>
Date: Fri Dec 26 23:41:09 2014 +0000
functional-tests: Remove unittest2, go back to built-in unittest module
This will break the functional-tests for anyone using Python 2.6 or
older. Oh well.
tests/functional-tests/01-insertion.py | 3 +-
tests/functional-tests/02-sparql-bugs.py | 3 +-
tests/functional-tests/03-fts-functions.py | 3 +-
tests/functional-tests/04-group-concat.py | 3 +-
tests/functional-tests/05-coalesce.py | 3 +-
tests/functional-tests/06-distance.py | 3 +-
tests/functional-tests/07-graph.py | 3 +-
tests/functional-tests/08-unique-insertions.py | 3 +-
tests/functional-tests/09-concurrent-query.py | 3 +-
tests/functional-tests/10-sqlite-misused.py | 3 +-
tests/functional-tests/11-sqlite-batch-misused.py | 3 +-
tests/functional-tests/12-transactions.py | 3 +-
tests/functional-tests/13-threaded-store.py | 3 +-
tests/functional-tests/14-signals.py | 2 +-
tests/functional-tests/15-statistics.py | 3 +-
tests/functional-tests/16-collation.py | 3 +-
tests/functional-tests/17-ontology-changes.py | 3 +-
tests/functional-tests/200-backup-restore.py | 2 +-
tests/functional-tests/300-miner-basic-ops.py | 2 +-
.../functional-tests/301-miner-resource-removal.py | 2 +-
tests/functional-tests/310-fts-indexing.py | 2 +-
tests/functional-tests/400-extractor.py | 2 +-
tests/functional-tests/500-writeback.py | 2 +-
tests/functional-tests/501-writeback-details.py | 2 +-
tests/functional-tests/600-applications-camera.py | 2 +-
tests/functional-tests/601-applications-sync.py | 2 +-
.../common/utils/applicationstest.py | 2 +-
.../common/utils/expectedFailure.py | 6 +-
tests/functional-tests/common/utils/minertest.py | 2 +-
tests/functional-tests/common/utils/storetest.py | 3 +-
.../functional-tests/common/utils/writebacktest.py | 2 +-
tests/functional-tests/unittest2/Makefile.am | 19 -
tests/functional-tests/unittest2/__init__.py | 72 --
tests/functional-tests/unittest2/__main__.py | 14 -
tests/functional-tests/unittest2/case.py | 1082 --------------------
tests/functional-tests/unittest2/compatibility.py | 68 --
tests/functional-tests/unittest2/loader.py | 336 ------
tests/functional-tests/unittest2/main.py | 241 -----
tests/functional-tests/unittest2/result.py | 187 ----
tests/functional-tests/unittest2/runner.py | 213 ----
tests/functional-tests/unittest2/signals.py | 65 --
tests/functional-tests/unittest2/suite.py | 265 -----
tests/functional-tests/unittest2/unit2 | 8 -
tests/functional-tests/unittest2/unit2.py | 8 -
tests/functional-tests/unittest2/util.py | 99 --
45 files changed, 33 insertions(+), 2727 deletions(-)
---
diff --git a/tests/functional-tests/01-insertion.py b/tests/functional-tests/01-insertion.py
index 1e25467..8eb58a6 100755
--- a/tests/functional-tests/01-insertion.py
+++ b/tests/functional-tests/01-insertion.py
@@ -32,8 +32,7 @@ import string
import datetime
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/02-sparql-bugs.py b/tests/functional-tests/02-sparql-bugs.py
index dc6ba18..655f945 100755
--- a/tests/functional-tests/02-sparql-bugs.py
+++ b/tests/functional-tests/02-sparql-bugs.py
@@ -31,8 +31,7 @@ import string
import datetime
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
from common.utils.expectedFailure import expectedFailureBug
diff --git a/tests/functional-tests/03-fts-functions.py b/tests/functional-tests/03-fts-functions.py
index e20b926..4459538 100755
--- a/tests/functional-tests/03-fts-functions.py
+++ b/tests/functional-tests/03-fts-functions.py
@@ -27,8 +27,7 @@ import unittest
import random
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/04-group-concat.py b/tests/functional-tests/04-group-concat.py
index e14bb1e..eadc7c6 100755
--- a/tests/functional-tests/04-group-concat.py
+++ b/tests/functional-tests/04-group-concat.py
@@ -25,8 +25,7 @@ import unittest
import random
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/05-coalesce.py b/tests/functional-tests/05-coalesce.py
index 5ae334c..6338014 100755
--- a/tests/functional-tests/05-coalesce.py
+++ b/tests/functional-tests/05-coalesce.py
@@ -26,8 +26,7 @@ import random
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/06-distance.py b/tests/functional-tests/06-distance.py
index e1b30eb..bd19933 100755
--- a/tests/functional-tests/06-distance.py
+++ b/tests/functional-tests/06-distance.py
@@ -25,8 +25,7 @@ import unittest
import random
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
POINT_COORDS = [
diff --git a/tests/functional-tests/07-graph.py b/tests/functional-tests/07-graph.py
index cb9d1d7..c43ca54 100755
--- a/tests/functional-tests/07-graph.py
+++ b/tests/functional-tests/07-graph.py
@@ -25,8 +25,7 @@ import unittest
import random
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/08-unique-insertions.py b/tests/functional-tests/08-unique-insertions.py
index ae235f9..88929ce 100755
--- a/tests/functional-tests/08-unique-insertions.py
+++ b/tests/functional-tests/08-unique-insertions.py
@@ -25,8 +25,7 @@ import unittest
import random
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/09-concurrent-query.py b/tests/functional-tests/09-concurrent-query.py
index f30d341..57a00c4 100755
--- a/tests/functional-tests/09-concurrent-query.py
+++ b/tests/functional-tests/09-concurrent-query.py
@@ -32,8 +32,7 @@ from gi.repository import GObject
from dbus.mainloop.glib import DBusGMainLoop
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
AMOUNT_OF_TEST_INSTANCES = 100
diff --git a/tests/functional-tests/10-sqlite-misused.py b/tests/functional-tests/10-sqlite-misused.py
index 37bbe5d..352d4b3 100755
--- a/tests/functional-tests/10-sqlite-misused.py
+++ b/tests/functional-tests/10-sqlite-misused.py
@@ -27,8 +27,7 @@ from gi.repository import GObject
from dbus.mainloop.glib import DBusGMainLoop
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/11-sqlite-batch-misused.py
b/tests/functional-tests/11-sqlite-batch-misused.py
index 5a26b77..6f6cfd0 100755
--- a/tests/functional-tests/11-sqlite-batch-misused.py
+++ b/tests/functional-tests/11-sqlite-batch-misused.py
@@ -27,8 +27,7 @@ from gi.repository import GObject
from dbus.mainloop.glib import DBusGMainLoop
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
# Number of instances per batch
diff --git a/tests/functional-tests/12-transactions.py b/tests/functional-tests/12-transactions.py
index ab62c2d..33b9bdc 100755
--- a/tests/functional-tests/12-transactions.py
+++ b/tests/functional-tests/12-transactions.py
@@ -24,8 +24,7 @@ import time
from common.utils import configuration as cfg
from common.utils.helpers import StoreHelper as StoreHelper
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
TEST_INSTANCE_PATTERN = "test://12-transactions-%d"
diff --git a/tests/functional-tests/13-threaded-store.py b/tests/functional-tests/13-threaded-store.py
index 69c9704..993a8c8 100755
--- a/tests/functional-tests/13-threaded-store.py
+++ b/tests/functional-tests/13-threaded-store.py
@@ -29,8 +29,7 @@ import time
from dbus.mainloop.glib import DBusGMainLoop
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.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 d72e747..4b49c52 100755
--- a/tests/functional-tests/14-signals.py
+++ b/tests/functional-tests/14-signals.py
@@ -23,7 +23,7 @@ are emitted. Theses tests are not extensive (only few selected signals
are tested)
"""
-import unittest2 as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
from common.utils import configuration as cfg
diff --git a/tests/functional-tests/15-statistics.py b/tests/functional-tests/15-statistics.py
index 0c36425..af9dee5 100755
--- a/tests/functional-tests/15-statistics.py
+++ b/tests/functional-tests/15-statistics.py
@@ -25,8 +25,7 @@ are updated when different operations are executed on the store
import time
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
RDFS_RESOURCE = "rdfs:Resource"
diff --git a/tests/functional-tests/16-collation.py b/tests/functional-tests/16-collation.py
index 8c51065..8be6cdf 100755
--- a/tests/functional-tests/16-collation.py
+++ b/tests/functional-tests/16-collation.py
@@ -27,8 +27,7 @@ import random
import locale
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
diff --git a/tests/functional-tests/17-ontology-changes.py b/tests/functional-tests/17-ontology-changes.py
index 43a3058..3728b59 100755
--- a/tests/functional-tests/17-ontology-changes.py
+++ b/tests/functional-tests/17-ontology-changes.py
@@ -27,8 +27,7 @@ import time
import os
import dbus # Just for the Exception
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
from common.utils.system import TrackerSystemAbstraction as TrackerSystemAbstraction
from common.utils.system import UnableToBootException as UnableToBootException
from common.utils.helpers import StoreHelper as StoreHelper
diff --git a/tests/functional-tests/200-backup-restore.py b/tests/functional-tests/200-backup-restore.py
index e5181b9..6d58f5b 100755
--- a/tests/functional-tests/200-backup-restore.py
+++ b/tests/functional-tests/200-backup-restore.py
@@ -25,7 +25,7 @@ from common.utils.helpers import StoreHelper
from common.utils import configuration as cfg
from common.utils.storetest import CommonTrackerStoreTest as CommonTrackerStoreTest
from common.utils.expectedFailure import expectedFailureBug, expectedFailureJournal
-import unittest2 as ut
+import unittest as ut
"""
diff --git a/tests/functional-tests/300-miner-basic-ops.py b/tests/functional-tests/300-miner-basic-ops.py
index 24ed8a0..4e38562 100755
--- a/tests/functional-tests/300-miner-basic-ops.py
+++ b/tests/functional-tests/300-miner-basic-ops.py
@@ -29,7 +29,7 @@ import os
import shutil
import time
-import unittest2 as ut
+import unittest as ut
from common.utils.helpers import log
from common.utils.minertest import CommonTrackerMinerTest, MINER_TMP_DIR, uri, path
diff --git a/tests/functional-tests/301-miner-resource-removal.py
b/tests/functional-tests/301-miner-resource-removal.py
index b432612..0ed2d83 100755
--- a/tests/functional-tests/301-miner-resource-removal.py
+++ b/tests/functional-tests/301-miner-resource-removal.py
@@ -34,7 +34,7 @@ import dbus
from gi.repository import GLib
import os
import shutil
-import unittest2 as ut
+import unittest as ut
MINER_TMP_DIR = cfg.TEST_MONITORED_TMP_DIR
diff --git a/tests/functional-tests/310-fts-indexing.py b/tests/functional-tests/310-fts-indexing.py
index 54cc47a..8014ed2 100755
--- a/tests/functional-tests/310-fts-indexing.py
+++ b/tests/functional-tests/310-fts-indexing.py
@@ -31,7 +31,7 @@ import shutil
import locale
import time
-import unittest2 as ut
+import unittest as ut
from common.utils.helpers import log
from common.utils.minertest import CommonTrackerMinerTest, MINER_TMP_DIR, uri, path, DEFAULT_TEXT
from common.utils import configuration as cfg
diff --git a/tests/functional-tests/400-extractor.py b/tests/functional-tests/400-extractor.py
index d7a8029..e29c275 100755
--- a/tests/functional-tests/400-extractor.py
+++ b/tests/functional-tests/400-extractor.py
@@ -25,7 +25,7 @@ directory (containing xxx.expected files)
from common.utils import configuration as cfg
from common.utils.extractor import get_tracker_extract_output
-import unittest2 as ut
+import unittest as ut
import os
import sys
diff --git a/tests/functional-tests/500-writeback.py b/tests/functional-tests/500-writeback.py
index 1fc52aa..05d60b6 100755
--- a/tests/functional-tests/500-writeback.py
+++ b/tests/functional-tests/500-writeback.py
@@ -27,7 +27,7 @@ import time
from common.utils.extractor import get_tracker_extract_output
from common.utils.writebacktest import CommonTrackerWritebackTest as CommonTrackerWritebackTest
-import unittest2 as ut
+import unittest as ut
from common.utils.expectedFailure import expectedFailureBug
REASONABLE_TIMEOUT = 5 # Seconds we wait for tracker-writeback to do the work
diff --git a/tests/functional-tests/501-writeback-details.py b/tests/functional-tests/501-writeback-details.py
index 6bc4d6d..5ba854e 100755
--- a/tests/functional-tests/501-writeback-details.py
+++ b/tests/functional-tests/501-writeback-details.py
@@ -20,7 +20,7 @@
from common.utils.writebacktest import CommonTrackerWritebackTest as CommonTrackerWritebackTest
from common.utils.extractor import get_tracker_extract_output
from common.utils.helpers import log
-import unittest2 as ut
+import unittest as ut
from common.utils.expectedFailure import expectedFailureBug
import os
import time
diff --git a/tests/functional-tests/600-applications-camera.py
b/tests/functional-tests/600-applications-camera.py
index a38b29c..333e982 100755
--- a/tests/functional-tests/600-applications-camera.py
+++ b/tests/functional-tests/600-applications-camera.py
@@ -25,7 +25,7 @@ Tests trying to simulate the behaviour of applications working with tracker
import os
import random
-import unittest2 as ut
+import unittest as ut
from common.utils.applicationstest import CommonTrackerApplicationTest as CommonTrackerApplicationTest
from common.utils.helpers import log
diff --git a/tests/functional-tests/601-applications-sync.py b/tests/functional-tests/601-applications-sync.py
index b2b0561..92b2127 100755
--- a/tests/functional-tests/601-applications-sync.py
+++ b/tests/functional-tests/601-applications-sync.py
@@ -34,7 +34,7 @@ import shutil
import fcntl
from common.utils import configuration as cfg
-import unittest2 as ut
+import unittest as ut
from common.utils.applicationstest import CommonTrackerApplicationTest as CommonTrackerApplicationTest
from common.utils.helpers import log
diff --git a/tests/functional-tests/common/utils/applicationstest.py
b/tests/functional-tests/common/utils/applicationstest.py
index ad8e51c..5f304fb 100644
--- a/tests/functional-tests/common/utils/applicationstest.py
+++ b/tests/functional-tests/common/utils/applicationstest.py
@@ -20,7 +20,7 @@
from common.utils import configuration as cfg
from common.utils.system import TrackerSystemAbstraction
from common.utils.helpers import log
-import unittest2 as ut
+import unittest as ut
from gi.repository import GLib
diff --git a/tests/functional-tests/common/utils/expectedFailure.py
b/tests/functional-tests/common/utils/expectedFailure.py
index bdc762a..de1a8c8 100644
--- a/tests/functional-tests/common/utils/expectedFailure.py
+++ b/tests/functional-tests/common/utils/expectedFailure.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-# Code taken and modified from unittest2 framework (case.py)
+# Code taken and modified from unittest framework (case.py)
# Copyright (c) 1999-2003 Steve Purcell
# Copyright (c) 2003-2010 Python Software Foundation
@@ -26,8 +26,8 @@ Write values in tracker and check the actual values are written
on the files. Note that these tests are highly platform dependant.
"""
import sys
-import unittest2 as ut
-from unittest2.compatibility import wraps
+import unittest as ut
+from unittest.compatibility import wraps
import configuration as cfg
diff --git a/tests/functional-tests/common/utils/minertest.py
b/tests/functional-tests/common/utils/minertest.py
index fc927b8..aadfa70 100644
--- a/tests/functional-tests/common/utils/minertest.py
+++ b/tests/functional-tests/common/utils/minertest.py
@@ -19,7 +19,7 @@
#
from common.utils import configuration as cfg
from common.utils.system import TrackerSystemAbstraction
-import unittest2 as ut
+import unittest as ut
from gi.repository import GLib
diff --git a/tests/functional-tests/common/utils/storetest.py
b/tests/functional-tests/common/utils/storetest.py
index 3c35e49..b585b91 100644
--- a/tests/functional-tests/common/utils/storetest.py
+++ b/tests/functional-tests/common/utils/storetest.py
@@ -25,8 +25,7 @@ from common.utils.system import TrackerSystemAbstraction
from common.utils.helpers import StoreHelper
from common.utils import configuration as cfg
-import unittest2 as ut
-#import unittest as ut
+import unittest as ut
class CommonTrackerStoreTest (ut.TestCase):
diff --git a/tests/functional-tests/common/utils/writebacktest.py
b/tests/functional-tests/common/utils/writebacktest.py
index dd96c4f..677570f 100644
--- a/tests/functional-tests/common/utils/writebacktest.py
+++ b/tests/functional-tests/common/utils/writebacktest.py
@@ -22,7 +22,7 @@ from gi.repository import GLib
from common.utils.system import TrackerSystemAbstraction
import shutil
-import unittest2 as ut
+import unittest as ut
import os
from common.utils import configuration as cfg
from common.utils.helpers import log
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]