Imported from SVN by Bitbucket
This commit is contained in:
25
PasteScript-1.7.4.2-py2.6.egg/tests/test_egg_finder.py
Executable file
25
PasteScript-1.7.4.2-py2.6.egg/tests/test_egg_finder.py
Executable file
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
from paste.script import pluginlib
|
||||
|
||||
def test_egg_info():
|
||||
egg_dir = os.path.join(os.path.dirname(__file__),
|
||||
'fake_packages', 'FakePlugin.egg')
|
||||
found = pluginlib.find_egg_info_dir(os.path.join(egg_dir, 'fakeplugin'))
|
||||
assert found == os.path.join(egg_dir, 'FakePlugin.egg-info')
|
||||
found = pluginlib.find_egg_info_dir(os.path.dirname(__file__))
|
||||
assert found == os.path.join(
|
||||
os.path.dirname(os.path.dirname(__file__)),
|
||||
'PasteScript.egg-info')
|
||||
|
||||
def test_resolve_plugins():
|
||||
plugins = ['FakePlugin']
|
||||
all = pluginlib.resolve_plugins(plugins)
|
||||
assert all
|
||||
assert len(all) == 2
|
||||
|
||||
def test_find_commands():
|
||||
all = pluginlib.resolve_plugins(['PasteScript', 'FakePlugin'])
|
||||
commands = pluginlib.load_commands_from_plugins(all)
|
||||
print commands
|
||||
assert 'testcom' in commands
|
||||
|
||||
Reference in New Issue
Block a user