da0989f9f00cf2a9eca58410a721d23a1fdf72bb,contrib/python/tests/python/pants_test/contrib/python/checks/tasks/checkstyle/test_checkstyle.py,CheckstyleTest,build_checker_wheel,#Any#,34

Before Change


  @staticmethod
  def build_checker_wheel(root_dir):
    target = Checkstyle._CHECKER_ADDRESS_SPEC
    subprocess.check_call([os.path.join(get_buildroot(), "pants"),
                           "--pants-distdir={}".format(root_dir),
                           "setup-py",
                           "--run=bdist_wheel --universal",
                           target])

    for root, _, files in os.walk(root_dir):
      for f in files:
        if f.endswith(".whl"):
          return os.path.join(root, f)

    raise AssertionError("Failed to generate a wheel for {}".format(target))

  @staticmethod
  def install_wheel(wheel, root_dir):

After Change


    subprocess.run(command, check=True)

    wheel_files = Path(root_dir).rglob("*.whl")
    if not wheel_files:
      raise AssertionError(f"Failed to generate a wheel for {target}")
    return str(next(wheel_files))

  @staticmethod
  def install_wheel(wheel, root_dir):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: pantsbuild/pants
Commit Name: da0989f9f00cf2a9eca58410a721d23a1fdf72bb
Time: 2019-08-19
Author: ericarellano@me.com
File Name: contrib/python/tests/python/pants_test/contrib/python/checks/tasks/checkstyle/test_checkstyle.py
Class Name: CheckstyleTest
Method Name: build_checker_wheel


Project Name: dpressel/mead-baseline
Commit Name: 1b8f024d01511ad332d71b973e0efc432363a160
Time: 2018-08-11
Author: blester125@users.noreply.github.com
File Name: clean.py
Class Name:
Method Name:


Project Name: aws/sagemaker-python-sdk
Commit Name: e0944e023d92c2861aa1c74f9fd2e8cf52e276b8
Time: 2018-11-14
Author: phoenixinter@gmail.com
File Name: src/sagemaker/local/utils.py
Class Name:
Method Name: recursive_copy


Project Name: matplotlib/matplotlib
Commit Name: 66348a9259bc034d0f6b21cfb554f8b2f0af94b0
Time: 2018-03-23
Author: anntzer.lee@gmail.com
File Name: tools/triage_tests.py
Class Name:
Method Name: find_failing_tests


Project Name: pantsbuild/pants
Commit Name: da0989f9f00cf2a9eca58410a721d23a1fdf72bb
Time: 2019-08-19
Author: ericarellano@me.com
File Name: contrib/python/tests/python/pants_test/contrib/python/checks/tasks/checkstyle/test_checkstyle.py
Class Name: CheckstyleTest
Method Name: build_checker_wheel