Update 'NEWS' for 0.6.
[jackhill/guix/guix.git] / gnu / packages / patches / python-fix-tests.patch
CommitLineData
9a9a3adf
CR
1See the discussion about the issues fixed here at:
2http://bugs.python.org/issue20868 .
3
4--- Lib/test/test_shutil.py 2014-03-01 03:02:36.088311000 +0100
5+++ Lib/test/test_shutil.py 2014-03-01 04:56:37.768311000 +0100
6@@ -1053,6 +1053,7 @@
7 self.assertRaises(ValueError, make_archive, base_name, 'xxx')
8
9 @requires_zlib
10+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
11 def test_make_archive_owner_group(self):
12 # testing make_archive with owner and group, with various combinations
13 # this works even if there's not gid/uid support
14@@ -1081,6 +1082,7 @@
15
16
17 @requires_zlib
18+ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
19 @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
20 def test_tarfile_root_owner(self):
21 tmpdir, tmpdir2, base_name = self._create_files()
22
23--- Lib/test/test_posixpath.py 2014-03-01 05:46:56.984311000 +0100
24+++ Lib/test/test_posixpath.py 2014-03-07 00:59:20.888311000 +0100
25@@ -319,7 +319,11 @@
26 del env['HOME']
27 home = pwd.getpwuid(os.getuid()).pw_dir
28 # $HOME can end with a trailing /, so strip it (see #17809)
29- self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
30+ # The Guix builders have '/' as a home directory, so
31+ # home.rstrip("/") will be an empty string and the test will
32+ # fail. Let's just disable it since it does not really make
33+ # sense with such a bizarre setup.
34+ # self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
35
36 def test_normpath(self):
37 self.assertEqual(posixpath.normpath(""), ".")
38--- Lib/test/test_socket.py.orig 2014-03-02 22:14:12.264311000 +0100
39+++ Lib/test/test_socket.py 2014-03-21 03:50:45.660311000 +0100
40@@ -819,6 +819,8 @@
41 self.assertRaises(OverflowError, socket.htonl, k)
42 self.assertRaises(OverflowError, socket.htons, k)
43
44+ @unittest.skipUnless(os.path.exists("/etc/services"),
45+ "getservbyname uses /etc/services, which is not in the chroot")
46 def testGetServBy(self):
47 eq = self.assertEqual
48 # Find one service that exists, then check all the related interfaces.
49@@ -1104,6 +1106,8 @@
50 self.assertRaises(ValueError, s.ioctl, -1, None)
51 s.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 100, 100))
52
53+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
54+ "getaddrinfo() will fail")
55 def testGetaddrinfo(self):
56 try:
57 socket.getaddrinfo('localhost', 80)
58@@ -1174,6 +1178,8 @@
59 # only IP addresses are allowed
60 self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0)
61
62+ @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
63+ "getaddrinfo() will fail")
64 @unittest.skipUnless(support.is_resource_enabled('network'),
65 'network is not enabled')
66 def test_idna(self):