diff options
author | Robert Collins <robertc@robertcollins.net> | 2011-06-23 17:54:36 +1200 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2011-06-23 17:54:36 +1200 |
commit | 6b5695a1e5b6969ba16ad382256005c211e281c7 (patch) | |
tree | beda0a73609a73e6b73b215452b4d4976cb8fd86 /README | |
parent | 5ef29b108b18a2814944936b3e2862bb53f1b3c2 (diff) | |
download | fixtures-6b5695a1e5b6969ba16ad382256005c211e281c7.tar.gz |
New fixture ``PackagePathEntry`` which patches the path of an existing
package, allowing importing part of it from aonther directory.
(Robert Collins)
Diffstat (limited to 'README')
-rw-r--r-- | README | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -283,6 +283,15 @@ Control the value of a named python attribute. ... pass >>> fixture = fixtures.MonkeyPatch('__builtin__.open', fake_open) +PackagePathEntry +++++++++++++++++ + +Adds a single directory to the path for an existing python package. This adds +to the package.__path__ list. If the directory is already in the path, nothing +happens, if it isn't then it is added on setUp and removed on cleanUp. + + >>> fixture = fixtures.PackagePathEntry('package/name', '/foo/bar') + PopenFixture ++++++++++++ |