[pitivi: 32/36] tests: Run the still image testsuite when running check-integration
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 32/36] tests: Run the still image testsuite when running check-integration
- Date: Sun, 22 May 2011 20:34:10 +0000 (UTC)
commit f75860358d82985efc5c624500e4dc8891225802
Author: Thibault Saunier <thibault saunier collabora co uk>
Date: Fri May 20 16:20:59 2011 -0400
tests: Run the still image testsuite when running check-integration
This testsuite is based on sample files, and can not be runned when running distcheck
tests/Makefile.am | 2 +-
tests/runtests.py | 10 +++++++++-
tests/test_integration.py | 14 --------------
3 files changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 576d4ef..3da77a0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,4 +28,4 @@ check-local:
check-integration:
@PYTHONPATH=$(top_srcdir):$(PYTHONPATH) TEST_INTEGRATION=1 $(PYTHON)\
- $(srcdir)/test_integration.py
+ $(srcdir)/runtests.py
diff --git a/tests/runtests.py b/tests/runtests.py
index b1e3a46..5482f1b 100644
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -4,9 +4,17 @@ import sys
import unittest
import tests
-SKIP_FILES = ['common', 'runtests', 'test_integration']
+SKIP_FILES = ['common', 'runtests'] #They are not testsuites
+#Those files need sample files, and therefore shoud not be tested
+#when running distcheck
+INTEGRATION_FILES=['test_still_image', 'test_integration']
def gettestnames(which):
+ if os.getenv("TEST_INTEGRATION"):
+ return INTEGRATION_FILES
+ else:
+ SKIP_FILES.extend(INTEGRATION_FILES)
+
if not which:
dir = os.path.split(os.path.abspath(__file__))[0]
which = [os.path.basename(p) for p in glob.glob('%s/test_*.py' % dir)]
diff --git a/tests/test_integration.py b/tests/test_integration.py
index f627289..65b8b22 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -1076,17 +1076,3 @@ class TestTransitions(Base):
def testSaveAndLoadWithTransitions(self):
pass
-
-# Readable code ends here <-
-
-if not os.getenv("TEST_INTEGRATION"):
- import inspect
-
- for symbol_name in list(globals().keys()):
- symbol = globals()[symbol_name]
- if inspect.isclass(symbol) and symbol.__name__.startswith('Test') \
- and symbol.__module__ == __name__:
- del globals()[symbol_name]
-
-if __name__ == "__main__":
- unittest.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]