File: socket-test-fix.patch

package info (click to toggle)
python-pathlib 1.0.1-2.1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 364 kB
  • sloc: python: 2,450; makefile: 139
file content (18 lines) | stat: -rw-r--r-- 789 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: adapt test exception to python2
Author: Julian Taylor <jtaylor.debian@googlemail.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897496
Bug: https://bitbucket.org/pitrou/pathlib/issues/32

Index: python-pathlib-1.0.1/test_pathlib.py
===================================================================
--- python-pathlib-1.0.1.orig/test_pathlib.py
+++ python-pathlib-1.0.1/test_pathlib.py
@@ -1687,7 +1687,7 @@ class _BasePathTest(object):
         self.addCleanup(sock.close)
         try:
             sock.bind(str(P))
-        except OSError as e:
+        except (OSError, socket.error) as e:
             if "AF_UNIX path too long" in str(e):
                 self.skipTest("cannot bind Unix socket: " + str(e))
         self.assertTrue(P.is_socket())