# HG changeset patch # User Sylvain Thénault # Date 1285231598 -7200 # Node ID b233cc448bdd2b8d50314a5e17aaae99102741dc # Parent b3fd91524132d0fc6b0bff042b7d8589ef946a05 [test] add some fake cubes necessary for test so we don't depend on the actual forge cube diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/comment/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/cubes/comment/__init__.py Thu Sep 23 10:46:38 2010 +0200 @@ -0,0 +1,17 @@ +# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/comment/__pkginfo__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/cubes/comment/__pkginfo__.py Thu Sep 23 10:46:38 2010 +0200 @@ -0,0 +1,25 @@ +# pylint: disable-msg=W0622 +# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . +"""cubicweb-comment packaging information""" + +distname = "cubicweb-comment" +modname = distname.split('-', 1)[1] + +numversion = (1, 4, 3) +version = '.'.join(str(num) for num in numversion) diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/email/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/cubes/email/__init__.py Thu Sep 23 10:46:38 2010 +0200 @@ -0,0 +1,17 @@ +# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/email/__pkginfo__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/cubes/email/__pkginfo__.py Thu Sep 23 10:46:38 2010 +0200 @@ -0,0 +1,30 @@ +# pylint: disable-msg=W0622 +# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . +"""cubicweb-email packaging information""" + +distname = "cubicweb-email" +modname = distname.split('-', 1)[1] + +numversion = (1, 4, 3) +version = '.'.join(str(num) for num in numversion) + + +__depends__ = {'cubicweb': None, + 'cubicweb-file': None} +__recommends__ = {'cubicweb-comment': None} diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/file/__pkginfo__.py --- a/test/data/cubes/file/__pkginfo__.py Wed Sep 22 20:12:38 2010 +0200 +++ b/test/data/cubes/file/__pkginfo__.py Thu Sep 23 10:46:38 2010 +0200 @@ -16,9 +16,7 @@ # # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . -"""cubicweb-file packaging information - -""" +"""cubicweb-file packaging information""" distname = "cubicweb-file" modname = distname.split('-', 1)[1] diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/forge/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/cubes/forge/__init__.py Thu Sep 23 10:46:38 2010 +0200 @@ -0,0 +1,17 @@ +# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . diff -r b3fd91524132 -r b233cc448bdd test/data/cubes/forge/__pkginfo__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/data/cubes/forge/__pkginfo__.py Thu Sep 23 10:46:38 2010 +0200 @@ -0,0 +1,32 @@ +# pylint: disable-msg=W0622 +# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr +# +# This file is part of CubicWeb. +# +# CubicWeb is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 2.1 of the License, or (at your option) +# any later version. +# +# CubicWeb is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with CubicWeb. If not, see . +"""cubicweb-forge packaging information""" + +distname = "cubicweb-forge" +modname = distname.split('-', 1)[1] + +numversion = (1, 4, 3) +version = '.'.join(str(num) for num in numversion) + + +__depends__ = {'cubicweb': None, + 'cubicweb-file': None, + 'cubicweb-email': None, + 'cubicweb-comment': None, + } diff -r b3fd91524132 -r b233cc448bdd test/unittest_cwconfig.py --- a/test/unittest_cwconfig.py Wed Sep 22 20:12:38 2010 +0200 +++ b/test/unittest_cwconfig.py Thu Sep 23 10:46:38 2010 +0200 @@ -15,9 +15,8 @@ # # You should have received a copy of the GNU Lesser General Public License along # with CubicWeb. If not, see . -""" +"""cubicweb.cwconfig unit tests""" -""" import sys import os import tempfile @@ -51,7 +50,9 @@ ApptestConfiguration.CUBES_PATH = [] def test_reorder_cubes(self): - # jpl depends on email and file and comment + self.config.__class__.CUBES_PATH = [CUSTOM_CUBES_DIR] + self.config.adjust_sys_path() + # forge depends on email and file and comment # email depends on file self.assertEquals(self.config.reorder_cubes(['file', 'email', 'forge']), ('forge', 'email', 'file')) @@ -67,6 +68,8 @@ ('forge', 'email', 'file')) def test_reorder_cubes_recommends(self): + self.config.__class__.CUBES_PATH = [CUSTOM_CUBES_DIR] + self.config.adjust_sys_path() from cubes.comment import __pkginfo__ as comment_pkginfo comment_pkginfo.__recommends_cubes__ = {'file': None} try: @@ -130,6 +133,7 @@ from cubes import file self.assertEquals(file.__path__, [join(CUSTOM_CUBES_DIR, 'file')]) + class FindPrefixTC(TestCase): def make_dirs(self, *args): path = join(tempfile.tempdir, *args)