[Python-modules-commits] r32327 - in packages/python-requests-cache/trunk/debian (5 files)
morph at users.alioth.debian.org
morph at users.alioth.debian.org
Sun Apr 12 12:22:33 UTC 2015
Date: Sunday, April 12, 2015 @ 12:22:32
Author: morph
Revision: 32327
I'm not wasting more time trying to run tests for this module
Added:
packages/python-requests-cache/trunk/debian/patches/
packages/python-requests-cache/trunk/debian/patches/series
packages/python-requests-cache/trunk/debian/patches/tests_dont_import_toplevel_dir.patch
Modified:
packages/python-requests-cache/trunk/debian/control
packages/python-requests-cache/trunk/debian/rules
Modified: packages/python-requests-cache/trunk/debian/control
===================================================================
--- packages/python-requests-cache/trunk/debian/control 2015-04-11 20:10:34 UTC (rev 32326)
+++ packages/python-requests-cache/trunk/debian/control 2015-04-12 12:22:32 UTC (rev 32327)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Sandro Tosi <morph at debian.org>
Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 9), python, python3, dh-python, python-sphinx, python-requests
+Build-Depends: debhelper (>= 9), python, python3, dh-python, python-sphinx, python-requests, python3-requests, python-pymongo, python3-pymongo, python-redis, python3-redis
Standards-Version: 3.9.6
Homepage: https://github.com/reclosedev/requests-cache
Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-requests-cache/trunk/
Added: packages/python-requests-cache/trunk/debian/patches/series
===================================================================
--- packages/python-requests-cache/trunk/debian/patches/series (rev 0)
+++ packages/python-requests-cache/trunk/debian/patches/series 2015-04-12 12:22:32 UTC (rev 32327)
@@ -0,0 +1 @@
+tests_dont_import_toplevel_dir.patch
Added: packages/python-requests-cache/trunk/debian/patches/tests_dont_import_toplevel_dir.patch
===================================================================
--- packages/python-requests-cache/trunk/debian/patches/tests_dont_import_toplevel_dir.patch (rev 0)
+++ packages/python-requests-cache/trunk/debian/patches/tests_dont_import_toplevel_dir.patch 2015-04-12 12:22:32 UTC (rev 32327)
@@ -0,0 +1,77 @@
+Description: Don't force usage of toplevel dir to run tests
+Author: Sandro Tosi <morph at debian.org>
+Origin: vendor
+Forwarded: no
+Last-Update: 2015-04-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/tests/test_cache.py
++++ b/tests/test_cache.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ try:
+ import unittest2 as unittest
+--- a/tests/test_custom_dict.py
++++ b/tests/test_custom_dict.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ from requests_cache.backends.storage.dbdict import DbDict, DbPickleDict
+
+--- a/tests/test_dbdict.py
++++ b/tests/test_dbdict.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ try:
+ import unittest2 as unittest
+--- a/tests/test_mongodict.py
++++ b/tests/test_mongodict.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ try:
+ import unittest2 as unittest
+--- a/tests/test_monkey_patch.py
++++ b/tests/test_monkey_patch.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ try:
+ import unittest2 as unittest
+--- a/tests/test_redisdict.py
++++ b/tests/test_redisdict.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ try:
+ import unittest2 as unittest
+--- a/tests/test_thread_safety.py
++++ b/tests/test_thread_safety.py
+@@ -2,7 +2,6 @@
+ # -*- coding: utf-8 -*-
+ # Path hack
+ import os, sys
+-sys.path.insert(0, os.path.abspath('..'))
+
+ try:
+ import unittest2 as unittest
Modified: packages/python-requests-cache/trunk/debian/rules
===================================================================
--- packages/python-requests-cache/trunk/debian/rules 2015-04-11 20:10:34 UTC (rev 32326)
+++ packages/python-requests-cache/trunk/debian/rules 2015-04-12 12:22:32 UTC (rev 32327)
@@ -1,5 +1,8 @@
#!/usr/bin/make -f
+LIB2 := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)")
+LIB3 := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)")
+
%:
dh $@ --with python2,python3,sphinxdoc
@@ -11,6 +14,15 @@
python setup.py install --root=debian/python-requests-cache --install-layout=deb
python3 setup.py install --root=debian/python3-requests-cache --install-layout=deb
+#override_dh_auto_test:
+#ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+# # we can't use unittest discover -s tests as tests for redis/mongo are
+# # trying to use the system-installed redis/mongo instance, which is unsafe
+# sleep 10
+# PYTHONPATH=$$LIB2:tests python -m unittest -v test_cache test_custom_dict test_dbdict test_monkey_patch test_thread_safety
+# PYTHONPATH=$$LIB3:tests python3 -m unittest -v test_cache test_custom_dict test_dbdict test_monkey_patch test_thread_safety
+#endif
+
override_dh_installexamples:
dh_installexamples -ppython-requests-cache-doc example.py history_issue.py howdoi_issue.py sandbox.py
More information about the Python-modules-commits
mailing list