def setup_dupe_runtime(self):
from calmjs.testing import utils
from calmjs.npm import npm
utils.foo_runtime = runtime.PackageManagerRuntime(npm.cli_driver)
utils.runtime_foo = runtime.PackageManagerRuntime(npm.cli_driver)
def cleanup():
del utils.foo_runtime
del utils.runtime_foo
self.addCleanup(cleanup)
make_dummy_dist(self, ((
'entry_points.txt',
'[calmjs.runtime]\n'
'bar = calmjs.testing.utils:foo_runtime\n'
),), 'example1.foo', '1.0')
make_dummy_dist(self, ((
'entry_points.txt',
'[calmjs.runtime]\n'
'bar = calmjs.testing.utils:foo_runtime\n'
),), 'example2.foo', '1.0')
make_dummy_dist(self, ((
'entry_points.txt',
'[calmjs.runtime]\n'
'bar = calmjs.testing.utils:runtime_foo\n'
'baz = calmjs.testing.utils:runtime_foo\n'
),), 'example3.foo', '1.0')
make_dummy_dist(self, ((
'entry_points.txt',
'[calmjs.runtime]\n'
'bar = calmjs.testing.utils:runtime_foo\n'
'baz = calmjs.testing.utils:runtime_foo\n'
),), 'example4.foo', '1.0')
return pkg_resources.WorkingSet([self._calmjs_testing_tmpdir])
评论列表
文章目录