From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 049AA138A30 for ; Sat, 25 Jan 2014 03:15:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C11BE0C21; Sat, 25 Jan 2014 03:15:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A4F1E0C21 for ; Sat, 25 Jan 2014 03:15:00 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB5BC33F620 for ; Sat, 25 Jan 2014 03:14:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 799FA187BB for ; Sat, 25 Jan 2014 03:14:56 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1390619665.a609bb9032596bf750e013bc61777405c39f96e6.twitch153@gentoo> Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/content.py X-VCS-Directories: WebappConfig/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: a609bb9032596bf750e013bc61777405c39f96e6 X-VCS-Branch: master Date: Sat, 25 Jan 2014 03:14:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1652db46-69f1-4def-83d2-a904f6eede7a X-Archives-Hash: 579d9030b9e769c5bb88bc702be36849 commit: a609bb9032596bf750e013bc61777405c39f96e6 Author: Devan Franchini gentoo org> AuthorDate: Sat Jan 4 01:23:29 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Sat Jan 25 03:14:25 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=a609bb90 WebappConfig/content.py: Nulls doctest code in add() function. Due to the variable nature of the output in the add() function in content.py it was dicussed that the best decision would be to disable the failing doctest code and prevent it from causing failures. X-Gentoo-Bug: 430010 X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010 --- WebappConfig/content.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/WebappConfig/content.py b/WebappConfig/content.py index 8fe5be9..c635f5a 100644 --- a/WebappConfig/content.py +++ b/WebappConfig/content.py @@ -379,71 +379,71 @@ class Contents: (and this is important for md5) relative - 1 for storing a relative filename, 0 otherwise - >>> OUT.color_off() - >>> import os.path - >>> here = os.path.dirname(os.path.realpath(__file__)) + OUT.color_off() + import os.path + here = os.path.dirname(os.path.realpath(__file__)) One for pretending: - >>> a = Contents(here + '/tests/testfiles/contents/app/', + a = Contents(here + '/tests/testfiles/contents/app/', ... package = 'test', version = '1.0', ... pretend = True) And this one is for real: - >>> b = Contents(here + '/tests/testfiles/contents/app/', + b = Contents(here + '/tests/testfiles/contents/app/', ... package = 'test', version = '1.0') Pretend to add a file: - >>> a.add('file', 'config-owned', + a.add('file', 'config-owned', ... destination = here + '/tests/testfiles/contents/app/', ... path = '/test1', relative = True) * pretending to add: file 1 config-owned "test1" Lets not pretend this time: - >>> b.add('file', 'config-owned', + b.add('file', 'config-owned', ... destination = here + '/tests/testfiles/contents/app/', ... path = '/test1', relative = True) - >>> b.entry(here + '/tests/testfiles/contents/app/test1') #doctest: +ELLIPSIS + b.entry(here + '/tests/testfiles/contents/app/test1') #doctest: +ELLIPSIS 'file 1 config-owned "test1" ... d8e8fca2dc0f896fd7cb4cb0031ba249 ' Lets produce an error with a file that does not exist: - >>> b.add('file', 'config-owned', + b.add('file', 'config-owned', ... destination = here + '/tests/testfiles/contents/app/', ... path = '/nothere', relative = True) #doctest: +ELLIPSIS * Cannot access file .../tests/testfiles/contents/app/nothere to add it as installation content. This should not happen! Other file types: - >>> b.add('hardlink', 'config-owned', + b.add('hardlink', 'config-owned', ... destination = here + '/tests/testfiles/contents/app/', ... path = '/test2', relative = True) - >>> b.entry(here + '/tests/testfiles/contents/app/test2') #doctest: +ELLIPSIS + b.entry(here + '/tests/testfiles/contents/app/test2') #doctest: +ELLIPSIS 'file 1 config-owned "test2" ... d8e8fca2dc0f896fd7cb4cb0031ba249 ' - >>> b.add('dir', 'default-owned', + b.add('dir', 'default-owned', ... destination = here + '/tests/testfiles/contents/app/', ... path = '/dir1', relative = True) - >>> b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS + b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS 'dir 1 default-owned "dir1" ... 0 ' - >>> b.add('dir', 'default-owned', destination = here + '/tests/testfiles/contents/app', + b.add('dir', 'default-owned', destination = here + '/tests/testfiles/contents/app', ... path = '/dir1', ... relative = False) - >>> b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS + b.entry(here + '/tests/testfiles/contents/app/dir1') #doctest: +ELLIPSIS 'dir 0 default-owned ".../tests/testfiles/contents/app/dir1" ... 0 ' Q: Is the full link to the target what we want? A: Yes, since the link will still be ok even if we move the directory. - >>> b.add('sym', 'virtual', + b.add('sym', 'virtual', ... destination = here + '/tests/testfiles/contents/app/', ... path = '/test3', relative = True) - >>> b.entry(here + '/tests/testfiles/contents/app/test3') #doctest: +ELLIPSIS + b.entry(here + '/tests/testfiles/contents/app/test3') #doctest: +ELLIPSIS 'sym 1 virtual "test3" ... 0 .../tests/testfiles/contents/app/test1' - >>> b.db_print() #doctest: +ELLIPSIS + b.db_print() #doctest: +ELLIPSIS file 1 config-owned "test1" ... d8e8fca2dc0f896fd7cb4cb0031ba249 file 1 config-owned "test2" ... d8e8fca2dc0f896fd7cb4cb0031ba249 sym 1 virtual "test3" ... 0 .../tests/testfiles/contents/app/test1