Package: python-testtools
Version: 2.3.0-4
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  - d/control: Enable execution of autopkgtests.
  - d/p/fix-test-run.py.patch: Dropped. No longer needed.
  - d/tests/control: Drop python-testscenarios from Depends.
  - d/tests/testsuite-*: Set PYTHONPATH when running tests.

Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers cosmic
  APT policy: (500, 'cosmic'), (500, 'bionic-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-20-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru python-testtools-2.3.0/debian/control 
python-testtools-2.3.0/debian/control
--- python-testtools-2.3.0/debian/control       2018-04-13 10:37:46.000000000 
-0400
+++ python-testtools-2.3.0/debian/control       2018-05-14 14:34:30.000000000 
-0400
@@ -41,6 +41,7 @@
 Vcs-Git: https://salsa.debian.org/openstack-team/python/python-testtools.git
 Vcs-Browser: https://salsa.debian.org/openstack-team/python/python-testtools
 Homepage: https://github.com/testing-cabal/testtools
+XS-Testsuite: autopkgtest
 
 Package: python-testtools
 Architecture: all
diff -Nru python-testtools-2.3.0/debian/patches/fix-test-run.py.patch 
python-testtools-2.3.0/debian/patches/fix-test-run.py.patch
--- python-testtools-2.3.0/debian/patches/fix-test-run.py.patch 2018-04-13 
10:37:46.000000000 -0400
+++ python-testtools-2.3.0/debian/patches/fix-test-run.py.patch 1969-12-31 
19:00:00.000000000 -0500
@@ -1,38 +0,0 @@
-Description: Do not run test_run_list_failed_import
- This test is broken, let's just remove it.
-Author: Thomas Goirand <z...@debian.org>
-Forwarded: no
-Last-Update: 2015-07-09
-
---- python-testtools-1.8.0.orig/testtools/tests/test_run.py
-+++ python-testtools-1.8.0/testtools/tests/test_run.py
-@@ -191,29 +191,6 @@ class TestRun(TestCase):
- testtools.runexample.TestFoo.test_quux
- """, out.getvalue())
- 
--    def test_run_list_failed_import(self):
--        broken = self.useFixture(SampleTestFixture(broken=True))
--        out = StringIO()
--        # XXX: http://bugs.python.org/issue22811
--        unittest2.defaultTestLoader._top_level_dir = None
--        exc = self.assertRaises(
--            SystemExit,
--            run.main, ['prog', 'discover', '-l', broken.package.base, 
'*.py'], out)
--        self.assertEqual(2, exc.args[0])
--        self.assertThat(out.getvalue(), DocTestMatches("""\
--Failed to import test module: runexample
--Traceback (most recent call last):
--  File ".../loader.py", line ..., in _find_test_path
--    package = self._get_module_from_name(name)
--  File ".../loader.py", line ..., in _get_module_from_name
--    __import__(name)
--  File ".../runexample/__init__.py", line 1
--    class not in
--...^...
--SyntaxError: invalid syntax
--
--""", doctest.ELLIPSIS))
--
-     def test_run_orders_tests(self):
-         self.useFixture(SampleTestFixture())
-         out = StringIO()
diff -Nru python-testtools-2.3.0/debian/patches/series 
python-testtools-2.3.0/debian/patches/series
--- python-testtools-2.3.0/debian/patches/series        2018-04-13 
10:37:46.000000000 -0400
+++ python-testtools-2.3.0/debian/patches/series        2018-05-14 
14:33:56.000000000 -0400
@@ -1,2 +1 @@
 neutralize-failing-test.patch
-#fix-test-run.py.patch
diff -Nru python-testtools-2.3.0/debian/tests/control 
python-testtools-2.3.0/debian/tests/control
--- python-testtools-2.3.0/debian/tests/control 2018-04-13 10:37:46.000000000 
-0400
+++ python-testtools-2.3.0/debian/tests/control 2018-05-14 14:34:06.000000000 
-0400
@@ -1,7 +1,7 @@
 Tests: testsuite-py2
-Depends: python-testtools, python-testscenarios
+Depends: python-testtools
 Restrictions: allow-stderr
 
 Tests: testsuite-py3
-Depends: python3-testtools, python3-testscenarios
+Depends: python3-testtools
 Restrictions: allow-stderr
diff -Nru python-testtools-2.3.0/debian/tests/testsuite-py2 
python-testtools-2.3.0/debian/tests/testsuite-py2
--- python-testtools-2.3.0/debian/tests/testsuite-py2   2018-04-13 
10:37:46.000000000 -0400
+++ python-testtools-2.3.0/debian/tests/testsuite-py2   2018-05-14 
14:34:14.000000000 -0400
@@ -1,2 +1,2 @@
 #!/bin/sh -e
-python -m testtools.run testtools.tests.test_suite
+PYTHONPATH=`pwd` python -m testtools.run testtools.tests.test_suite
diff -Nru python-testtools-2.3.0/debian/tests/testsuite-py3 
python-testtools-2.3.0/debian/tests/testsuite-py3
--- python-testtools-2.3.0/debian/tests/testsuite-py3   2018-04-13 
10:37:46.000000000 -0400
+++ python-testtools-2.3.0/debian/tests/testsuite-py3   2018-05-14 
14:34:14.000000000 -0400
@@ -1,2 +1,2 @@
 #!/bin/sh -e
-python3 -m testtools.run testtools.tests.test_suite
+PYTHONPATH=`pwd` python3 -m testtools.run testtools.tests.test_suite

Reply via email to