[Python-modules-commits] [ldif3] 07/09: merge patched into master

Michael Fladischer fladi at moszumanska.debian.org
Fri Mar 17 08:26:20 UTC 2017


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

fladi pushed a commit to branch master
in repository ldif3.

commit 118f54fd64fd9172d2e6cb0243f21206cf86267d
Merge: 2b2ae55 3b9c19a
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri Mar 17 09:11:26 2017 +0100

    merge patched into master

 debian/.git-dpm                                    |  4 +-
 ...p-tests-that-require-network-connectivity.patch | 51 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 tests.py                                           |  6 +++
 4 files changed, 60 insertions(+), 2 deletions(-)

diff --cc debian/.git-dpm
index a2246dc,0000000..63a0a35
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- ea59cdd7e254576a52496301d8bfa47166c739b3
- ea59cdd7e254576a52496301d8bfa47166c739b3
++3b9c19a6df51cd27f7e3685754ef6c63449bc22f
++3b9c19a6df51cd27f7e3685754ef6c63449bc22f
 +ea59cdd7e254576a52496301d8bfa47166c739b3
 +ea59cdd7e254576a52496301d8bfa47166c739b3
 +ldif3_3.2.2.orig.tar.gz
 +a4e383171c64489e32a316b29953e50d46bbd4e7
 +11970
diff --cc debian/patches/0001-Skip-tests-that-require-network-connectivity.patch
index 0000000,0000000..cb19a8a
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-Skip-tests-that-require-network-connectivity.patch
@@@ -1,0 -1,0 +1,51 @@@
++From 3b9c19a6df51cd27f7e3685754ef6c63449bc22f Mon Sep 17 00:00:00 2001
++From: Michael Fladischer <FladischerMichael at fladi.at>
++Date: Fri, 17 Mar 2017 09:10:14 +0100
++Subject: Skip tests that require network connectivity.
++
++By setting the environment NO_NETWOrK to any value some tests get skipped that
++would otherwise fail because of the missing network connection.
++---
++ tests.py | 6 ++++++
++ 1 file changed, 6 insertions(+)
++
++diff --git a/tests.py b/tests.py
++index 2647c97..edd5c12 100644
++--- a/tests.py
+++++ b/tests.py
++@@ -2,6 +2,7 @@
++ 
++ from __future__ import unicode_literals
++ 
+++import os
++ import unittest
++ 
++ try:
++@@ -13,6 +14,8 @@ from io import BytesIO
++ 
++ import ldif3
++ 
+++NO_NETWORK = 'NO_NETWORK' in os.environ
+++
++ 
++ BYTES = b"""version: 1
++ dn: cn=Alice Alison,
++@@ -229,15 +232,18 @@ class TestLDIFParser(unittest.TestCase):
++         self.assertEqual(attr_type, 'foo')
++         self.assertEqual(attr_value, 'a\nb\nc')
++ 
+++    @unittest.skipIf(NO_NETWORK, 'No network connectivity available')
++     def test_parse_attr_url(self):
++         self.p._process_url_schemes = [b'https']
++         attr_type, attr_value = self.p._parse_attr(b'foo:< ' + URL + b'\n')
++         self.assertIn(URL_CONTENT, attr_value)
++ 
+++    @unittest.skipIf(NO_NETWORK, 'No network connectivity available')
++     def test_parse_attr_url_all_ignored(self):
++         attr_type, attr_value = self.p._parse_attr(b'foo:< ' + URL + b'\n')
++         self.assertEqual(attr_value, '')
++ 
+++    @unittest.skipIf(NO_NETWORK, 'No network connectivity available')
++     def test_parse_attr_url_this_ignored(self):
++         self.p._process_url_schemes = [b'file']
++         attr_type, attr_value = self.p._parse_attr(b'foo:< ' + URL + b'\n')
diff --cc debian/patches/series
index 0000000,0000000..b1a6a14
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-Skip-tests-that-require-network-connectivity.patch

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



More information about the Python-modules-commits mailing list