e9bf50c354ed3d79a2dc6bd7354de2f9c5fd62c2,tests/python/pants_test/backend/codegen/tasks/test_ragel_gen.py,RagelGenTest,test_ragel_gen,#RagelGenTest#,84

Before Change


      saved_add_new_target = Context.add_new_target
      Context.add_new_target = MagicMock()
      task.execute()
      relative_task_outdir = os.path.relpath(self.task_outdir, get_buildroot())
      spec = "{spec_path}:{name}".format(spec_path=relative_task_outdir, name="test_ragel_gen.atoi")
      address = SyntheticAddress.parse(spec=spec)
      Context.add_new_target.assert_called_once_with(address,
                                                     JavaRagelLibrary,
                                                     derived_from=target,
                                                     sources=sources,

After Change


    self.create_file(relpath="test_ragel_gen/atoi.rl", contents=ragel_file_contents)
    target = self.make_target(spec="test_ragel_gen:atoi",
                              target_type=JavaRagelLibrary,
                              sources=["atoi.rl"])
    task = self.create_task(self.context(target_roots=[target]))

    task.execute()

    generated_files = []
    outdir = task.codegen_workdir(target)
    for root, _, files in os.walk(outdir):
      generated_files.extend(os.path.relpath(os.path.join(root, f), outdir) for f in files)

    self.assertEqual(["com/example/atoi/Parser.java"], generated_files)

  def test_smoke(self):
    with temporary_file() as fp:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: e9bf50c354ed3d79a2dc6bd7354de2f9c5fd62c2
Time: 2015-07-27
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/codegen/tasks/test_ragel_gen.py
Class Name: RagelGenTest
Method Name: test_ragel_gen


Project Name: pantsbuild/pants
Commit Name: cf6f30685b1540ae99c8ab7dd23ee4e75e5d2275
Time: 2014-12-08
Author: benjyw@gmail.com
File Name: src/python/pants/base/config.py
Class Name: Config
Method Name: load


Project Name: pantsbuild/pants
Commit Name: d45af2806326ee71c8f163daea6c0512b58fadd2
Time: 2019-07-28
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/subsystems/zinc.py
Class Name: Zinc
Method Name: _run_bootstrapper