44be4da8bda29e21061e550b6529a346934b9b0f,tests/python/pants_test/backend/python/test_python_chroot.py,PythonChrootTest,dumped_chroot,#PythonChrootTest#Any#,51
Before Change
def dumped_chroot(self, targets):
python_repos = create_subsystem(PythonRepos)
with subsystem_instance(IvySubsystem) as ivy_subsystem:
ivy_bootstrapper = Bootstrapper(ivy_subsystem=ivy_subsystem)
with subsystem_instance(ThriftBinary.Factory) as thrift_binary_factory:
interpreter_cache = PythonInterpreterCache(self.python_setup, python_repos)
interpreter_cache.setup()
interpreters = list(interpreter_cache.matched_interpreters([
self.python_setup.interpreter_requirement]))
self.assertGreater(len(interpreters), 0)
interpreter = interpreters[0]
with temporary_dir() as chroot:
pex_builder = PEXBuilder(path=chroot, interpreter=interpreter)
python_chroot = PythonChroot(python_setup=self.python_setup,
python_repos=python_repos,
ivy_bootstrapper=ivy_bootstrapper,
thrift_binary_factory=thrift_binary_factory.create,
interpreter=interpreter,
builder=pex_builder,
targets=targets,
platforms=["current"])
try:
python_chroot.dump()
yield pex_builder, python_chroot
finally:
python_chroot.delete()
def test_antlr(self):
self.create_file(relpath="src/antlr/word/word.g", contents=dedent(
grammar word;
After Change
self.context(for_subsystems=[PythonRepos, PythonSetup, IvySubsystem,
ThriftBinary.Factory, BinaryUtil.Factory])
python_repos = PythonRepos.global_instance()
ivy_bootstrapper = Bootstrapper(ivy_subsystem=IvySubsystem.global_instance())
thrift_binary_factory = ThriftBinary.Factory.global_instance().create
interpreter_cache = PythonInterpreterCache(self.python_setup, python_repos)
interpreter_cache.setup()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: pantsbuild/pants
Commit Name: 44be4da8bda29e21061e550b6529a346934b9b0f
Time: 2016-08-22
Author: benjyw@gmail.com
File Name: tests/python/pants_test/backend/python/test_python_chroot.py
Class Name: PythonChrootTest
Method Name: dumped_chroot
Project Name: pantsbuild/pants
Commit Name: 3b77f6b6c38fea6616cae10ca8e0c3a20782934a
Time: 2016-09-12
Author: benjyw@gmail.com
File Name: tests/python/pants_test/ivy/test_bootstrapper.py
Class Name: BootstrapperTest
Method Name: test_simple
Project Name: pantsbuild/pants
Commit Name: 78a526959260d7ce561b9ead625acb4837f900d0
Time: 2018-12-14
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/tasks/python_tool_prep_base.py
Class Name: PythonToolPrepBase
Method Name: execute