461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0,tests/python/pants_test/android/test_android_distribution.py,TestAndroidDistribution,test_register_tool_no_permission,#TestAndroidDistribution#,179

Before Change



  def test_register_tool_no_permission(self):
    with self.assertRaises(AndroidDistribution.DistributionError):
      with distribution() as sdk:
        with temporary_dir() as workdir:
          os.chmod(workdir, 0o400)
          android_sdk = AndroidDistribution.cached(sdk)
          android_jar = os.path.join("platforms", "android-19", "android.jar")
          android_sdk.register_android_tool(android_jar, workdir=workdir)

  def test_get_tool_path(self):
    with distribution() as sdk:
      android_sdk = AndroidDistribution.cached(sdk)
      android_jar = os.path.join("platforms", "android-19", "android.jar")

After Change


        self.assertIn(android_jar, android_sdk._validated_tools)

  def test_register_tool_no_permission(self):
    with distribution() as sdk:
      with temporary_dir() as workdir:
        os.chmod(workdir, 0o400)
        android_sdk = AndroidDistribution.cached(sdk)
        android_jar = os.path.join("platforms", "android-19", "android.jar")

        with self.assertRaises(AndroidDistribution.DistributionError):
          android_sdk.register_android_tool(android_jar, workdir=workdir)

  def test_get_tool_path(self):
    with distribution() as sdk:
      android_sdk = AndroidDistribution.cached(sdk)
      android_jar = os.path.join("platforms", "android-19", "android.jar")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: 461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0
Time: 2015-07-30
Author: mateorod9@gmail.com
File Name: tests/python/pants_test/android/test_android_distribution.py
Class Name: TestAndroidDistribution
Method Name: test_register_tool_no_permission


Project Name: pantsbuild/pants
Commit Name: 461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0
Time: 2015-07-30
Author: mateorod9@gmail.com
File Name: tests/python/pants_test/android/test_android_distribution.py
Class Name: TestAndroidDistribution
Method Name: test_register_copy_but_no_tool


Project Name: pantsbuild/pants
Commit Name: 461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0
Time: 2015-07-30
Author: mateorod9@gmail.com
File Name: tests/python/pants_test/android/test_android_distribution.py
Class Name: TestAndroidDistribution
Method Name: test_passing_sdk_path_missing_tools