Back to index

plone3  3.1.7
Variables
GroupUserFolder.tests.framework Namespace Reference

Variables

string __version__ = "$Revision: $"
 GroupUserFolder Copyright (C)2006 Ingeniweb.
string __docformat__ = 'restructuredtext'
tuple __SOFTWARE_HOME = os.environ.get('SOFTWARE_HOME', '')
tuple __INSTANCE_HOME = os.environ.get('INSTANCE_HOME', '')
list p0 = sys.path[0]
 s = __SOFTWARE_HOME
tuple p = dsandsoros.getcwd()
tuple zope_home = os.path.dirname(os.path.dirname(p))
string ztc_common = 'ztc_common.py'
tuple ztc_common_global = os.path.join(p, ztc_common)
int f = 0

Variable Documentation

string GroupUserFolder.tests.framework.__docformat__ = 'restructuredtext'

Definition at line 24 of file framework.py.

tuple GroupUserFolder.tests.framework.__INSTANCE_HOME = os.environ.get('INSTANCE_HOME', '')

Definition at line 70 of file framework.py.

tuple GroupUserFolder.tests.framework.__SOFTWARE_HOME = os.environ.get('SOFTWARE_HOME', '')

Definition at line 69 of file framework.py.

GroupUserFolder Copyright (C)2006 Ingeniweb.

ZopeTestCase.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

COPY THIS FILE TO YOUR 'tests' DIRECTORY.

This version of framework.py will use the SOFTWARE_HOME environment variable to locate Zope and the Testing package.

If the tests are run in an INSTANCE_HOME installation of Zope, Products.__path__ and sys.path with be adjusted to include the instance's Products and lib/python directories respectively.

If you explicitly set INSTANCE_HOME prior to running the tests, auto-detection is disabled and the specified path will be used instead.

If the 'tests' directory contains a custom_zodb.py file, INSTANCE_HOME will be adjusted to use it.

If you set the ZEO_INSTANCE_HOME environment variable a ZEO setup is assumed, and you can attach to a running ZEO server (via the instance's custom_zodb.py).

The following code should be at the top of every test module:

import os, sys if name == 'main': execfile(os.path.join(sys.path[0], 'framework.py'))

...and the following at the bottom:

if name == 'main': framework()

Definition at line 21 of file framework.py.

Definition at line 115 of file framework.py.

tuple GroupUserFolder.tests.framework.p = dsandsoros.getcwd()

Definition at line 86 of file framework.py.

string GroupUserFolder.tests.framework.p0 = sys.path[0]

Definition at line 81 of file framework.py.

Definition at line 85 of file framework.py.

tuple GroupUserFolder.tests.framework.zope_home = os.path.dirname(os.path.dirname(p))

Definition at line 89 of file framework.py.

Definition at line 112 of file framework.py.

Definition at line 113 of file framework.py.