unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 23ef17f082b8d8f7c917df874d753c405669a5f5 2967 bytes (raw)
name: gnu/packages/patches/python-fix-tests.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 
--- Lib/test/test_shutil.py	2014-03-01 04:56:37.768311000 +0100
+++ Lib/test/test_shutil.py	2014-03-01 03:02:36.088311000 +0100
@@ -1053,7 +1053,6 @@
         self.assertRaises(ValueError, make_archive, base_name, 'xxx')

     @requires_zlib
-    @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
     def test_make_archive_owner_group(self):
         # testing make_archive with owner and group, with various combinations
         # this works even if there's not gid/uid support
@@ -1082,7 +1081,6 @@


     @requires_zlib
-    @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix")
     @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
     def test_tarfile_root_owner(self):
         tmpdir, tmpdir2, base_name =  self._create_files()
--- Lib/test/test_posixpath.py	2014-03-01 05:46:56.984311000 +0100
+++ Lib/test/test_posixpath.py	2014-03-01 06:20:50.704311000 +0100
@@ -319,7 +319,11 @@
                 del env['HOME']
                 home = pwd.getpwuid(os.getuid()).pw_dir
                 # $HOME can end with a trailing /, so strip it (see #17809)
-                self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
+		# The Guix builders have '/' as a home directory, so
+		# home.rstrip("/") will be an empty string and the test will
+		# fail. Let's just disable it since it does not really make
+		# sense with such a bizarre setup.
+                # self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))

     def test_normpath(self):
         self.assertEqual(posixpath.normpath(""), ".")
--- Lib/test/test_socket.py	2014-03-02 22:14:12.264311000 +0100
+++ Lib/test/test_socket.py	2014-03-03 01:12:21.360311000 +0100
@@ -819,6 +819,8 @@
             self.assertRaises(OverflowError, socket.htonl, k)
             self.assertRaises(OverflowError, socket.htons, k)

+    @unittest.skipUnless(os.path.exists("/etc/services"),
+                         "getservbyname uses /etc/services, which is not in the chroot")
     def testGetServBy(self):
         eq = self.assertEqual
         # Find one service that exists, then check all the related interfaces.
@@ -1104,6 +1106,8 @@
         self.assertRaises(ValueError, s.ioctl, -1, None)
         s.ioctl(socket.SIO_KEEPALIVE_VALS, (1, 100, 100))

+    @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
+                         "getaddrinfo uses /etc/gai.conf, which is not in the chroot")
     def testGetaddrinfo(self):
         try:
             socket.getaddrinfo('localhost', 80)
@@ -1174,6 +1178,8 @@
         # only IP addresses are allowed
         self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0)

+    @unittest.skipUnless(os.path.exists("/etc/gai.conf"),
+                         "getaddrinfo uses /etc/gai.conf, which is not in the chroot")
     @unittest.skipUnless(support.is_resource_enabled('network'),
                          'network is not enabled')
     def test_idna(self):

debug log:

solving 23ef17f ...
found 23ef17f in https://yhetil.org/guix-devel/1394160455-32580-4-git-send-email-tipecaml@gmail.com/

applying [1/1] https://yhetil.org/guix-devel/1394160455-32580-4-git-send-email-tipecaml@gmail.com/
diff --git a/gnu/packages/patches/python-fix-tests.patch b/gnu/packages/patches/python-fix-tests.patch
new file mode 100644
index 0000000..23ef17f

Checking patch gnu/packages/patches/python-fix-tests.patch...
Applied patch gnu/packages/patches/python-fix-tests.patch cleanly.

index at:
100644 23ef17f082b8d8f7c917df874d753c405669a5f5	gnu/packages/patches/python-fix-tests.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).