[Python-modules-commits] [python-testing.postgresql] 04/07: Apply a patch to be compatible with testing.common.database >= 1.1.0.

Dominik George natureshadow-guest at moszumanska.debian.org
Thu Oct 13 11:57:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

natureshadow-guest pushed a commit to branch master
in repository python-testing.postgresql.

commit 003bc9d16da3df4f8a3f27d40e06ea6e0d86adc2
Merge: d55a117 659829a
Author: Dominik George <nik at naturalnet.de>
Date:   Thu Oct 13 13:45:13 2016 +0200

    Apply a patch to be compatible with testing.common.database >=
    1.1.0.

 debian/.git-dpm                                    |   4 +-
 debian/changelog                                   |   4 +-
 ...1-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch | 129 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 setup.py                                           |   2 +-
 tests/test_postgresql.py                           |  41 +++----
 6 files changed, 150 insertions(+), 31 deletions(-)

diff --cc debian/.git-dpm
index ee15303,0000000..846ade9
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- b427257b8230a01eb8c01154fc1cc8f9f67a5419
- b427257b8230a01eb8c01154fc1cc8f9f67a5419
++659829a63f423c495e6fbcc7a053235426234513
++659829a63f423c495e6fbcc7a053235426234513
 +b427257b8230a01eb8c01154fc1cc8f9f67a5419
 +b427257b8230a01eb8c01154fc1cc8f9f67a5419
 +python-testing.postgresql_1.3.0.orig.tar.gz
 +0e08d0bc0b958f90bd30f2d75087a946912af012
 +11000
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/changelog
index b27c8f0,0000000..5b68845
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,5 -1,0 +1,7 @@@
 +python-testing.postgresql (1.3.0-1) unstable; urgency=low
 +
 +  * Initial release. (Closes: #838582)
++  * Apply a patch to be compatible with testing.common.database >=
++    1.1.0.
 +
-  -- Dominik George <nik at naturalnet.de>  Thu, 29 Sep 2016 15:46:57 +0200
++ -- Dominik George <nik at naturalnet.de>  Thu, 13 Oct 2016 13:45:13 +0200
diff --cc debian/patches/0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch
index 0000000,0000000..2dd13b7
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch
@@@ -1,0 -1,0 +1,129 @@@
++From 659829a63f423c495e6fbcc7a053235426234513 Mon Sep 17 00:00:00 2001
++From: Dominik George <nik at naturalnet.de>
++Date: Thu, 13 Oct 2016 13:40:10 +0200
++Subject: =?UTF-8?q?From:=20Takeshi=20KOMIYA=20<i.tkomiya at gmail.com>=0ADate?=
++ =?UTF-8?q?:=20Fri,=205=20Feb=202016=2021:56:57=20+0900=0ASubject:=20[PATC?=
++ =?UTF-8?q?H]=20Use=20utility=20methods=20of=20testing.common.database=20>?=
++ =?UTF-8?q?=3D=201.1.0=0AOrigin:=20upstream,=20https://github.com/tk0miya/?=
++ =?UTF-8?q?testing.postgresql/commit/738c8eb19a4b064dd74ff851c379dd1cbf11b?=
++ =?UTF-8?q?c65.patch=0AApplied-Upstream:=20commit:738c8eb19a4b064dd74ff851?=
++ =?UTF-8?q?c379dd1cbf11bc65?=
++
++---
++ setup.py                 |  2 +-
++ tests/test_postgresql.py | 41 ++++++++++++++---------------------------
++ 2 files changed, 15 insertions(+), 28 deletions(-)
++
++diff --git a/setup.py b/setup.py
++index 08095cd..9e95298 100644
++--- a/setup.py
+++++ b/setup.py
++@@ -18,7 +18,7 @@ classifiers = [
++     "Topic :: Software Development :: Testing",
++ ]
++ 
++-install_requires = ['testing.common.database', 'pg8000 >= 1.10']
+++install_requires = ['testing.common.database >= 1.1.0', 'pg8000 >= 1.10']
++ if sys.version_info < (2, 7):
++     install_requires.append('unittest2')
++ 
++diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
++index 29e2b7e..b3603a2 100644
++--- a/tests/test_postgresql.py
+++++ b/tests/test_postgresql.py
++@@ -47,38 +47,31 @@ class TestPostgresql(unittest.TestCase):
++             conn.close()
++         finally:
++             # shutting down
++-            pid = pgsql.pid
++-            self.assertTrue(pid)
++-            os.kill(pid, 0)  # process is alive
+++            pid = pgsql.server_pid
+++            self.assertTrue(pgsql.is_alive())
++ 
++             pgsql.stop()
++             sleep(1)
++ 
++-            self.assertIsNone(pgsql.pid)
+++            self.assertFalse(pgsql.is_alive())
++             with self.assertRaises(OSError):
++                 os.kill(pid, 0)  # process is down
++ 
++     def test_stop(self):
++         # start postgresql server
++         pgsql = testing.postgresql.Postgresql()
++-        self.assertIsNotNone(pgsql.pid)
++         self.assertTrue(os.path.exists(pgsql.base_dir))
++-        pid = pgsql.pid
++-        os.kill(pid, 0)  # process is alive
+++        self.assertTrue(pgsql.is_alive())
++ 
++         # call stop()
++         pgsql.stop()
++-        self.assertIsNone(pgsql.pid)
++         self.assertFalse(os.path.exists(pgsql.base_dir))
++-        with self.assertRaises(OSError):
++-            os.kill(pid, 0)  # process is down
+++        self.assertFalse(pgsql.is_alive())
++ 
++         # call stop() again
++         pgsql.stop()
++-        self.assertIsNone(pgsql.pid)
++         self.assertFalse(os.path.exists(pgsql.base_dir))
++-        with self.assertRaises(OSError):
++-            os.kill(pid, 0)  # process is down
+++        self.assertFalse(pgsql.is_alive())
++ 
++         # delete postgresql object after stop()
++         del pgsql
++@@ -98,20 +91,17 @@ class TestPostgresql(unittest.TestCase):
++             self.assertIsNotNone(conn)
++             conn.close()
++ 
++-            pid = pgsql.pid
++-            os.kill(pid, 0)  # process is alive
+++            self.assertTrue(pgsql.is_alive())
++ 
++-        self.assertIsNone(pgsql.pid)
++-        with self.assertRaises(OSError):
++-            os.kill(pid, 0)  # process is down
+++        self.assertFalse(pgsql.is_alive())
++ 
++     def test_multiple_postgresql(self):
++         pgsql1 = testing.postgresql.Postgresql()
++         pgsql2 = testing.postgresql.Postgresql()
++-        self.assertNotEqual(pgsql1.pid, pgsql2.pid)
+++        self.assertNotEqual(pgsql1.server_pid, pgsql2.server_pid)
++ 
++-        os.kill(pgsql1.pid, 0)  # process is alive
++-        os.kill(pgsql2.pid, 0)  # process is alive
+++        self.assertTrue(pgsql1.is_alive())
+++        self.assertTrue(pgsql2.is_alive())
++ 
++     def test_postgresql_is_not_found(self):
++         try:
++@@ -135,21 +125,18 @@ class TestPostgresql(unittest.TestCase):
++         else:
++             os.wait()
++             sleep(1)
++-            self.assertTrue(pgsql.pid)
++-            os.kill(pgsql.pid, 0)  # process is alive (delete pgsql obj in child does not effect)
+++            self.assertTrue(pgsql.is_alive())  # process is alive (delete pgsql obj in child does not effect)
++ 
++     def test_stop_on_child_process(self):
++         pgsql = testing.postgresql.Postgresql()
++         if os.fork() == 0:
++             pgsql.stop()
++-            self.assertTrue(pgsql.pid)
++-            os.kill(pgsql.pid, 0)  # process is alive (calling stop() is ignored)
+++            os.kill(pgsql.server_pid, 0)  # process is alive (calling stop() is ignored)
++             os.kill(os.getpid(), signal.SIGTERM)  # exit tests FORCELY
++         else:
++             os.wait()
++             sleep(1)
++-            self.assertTrue(pgsql.pid)
++-            os.kill(pgsql.pid, 0)  # process is alive (calling stop() in child is ignored)
+++            self.assertTrue(pgsql.is_alive())  # process is alive (calling stop() in child is ignored)
++ 
++     def test_copy_data_from(self):
++         try:
diff --cc debian/patches/series
index 0000000,0000000..7bddafa
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-testing.postgresql.git



More information about the Python-modules-commits mailing list