ad9f8480c8e08b95d6c217ec4a126bd93b7f376a,tests/python/pants_test/backend/jvm/tasks/test_scalastyle.py,ScalastyleTest,test_get_non_synthetic_scala_targets,#ScalastyleTest#,118

Before Change



    // scala_library would bring in "scala-library defined in BUILD.tools
    // so we have an extra target here.
    self.assertEqual(5, len(context.targets()))

    // Now create the task and run the non_synthetic scala-only filtering.
    task = self._create_scalastyle_task_from_context(context)
    result_targets = task.get_non_synthetic_scala_targets(context.targets())

After Change


  def test_get_non_synthetic_scala_targets(self):
    with self.scala_platform_setup():
      // scala_library - should remain.
      scala_target = self.make_target("a/scala:s", ScalaLibrary, sources=["Source.scala"])

      // scala_library but with java sources - should be filtered
      scala_target_with_java_source = self.make_target("a/scala_java:sj",
                                                       ScalaLibrary,
                                                       sources=["Source.java"])

      // java_library - should be filtered
      java_target = self.make_target("a/java:j", JavaLibrary, sources=["Source.java"])

      // synthetic scala_library - should be filtered
      synthetic_scala_target = self.make_target("a/synthetic_scala:ss",
                                                ScalaLibrary,
                                                sources=["SourceGenerated.scala"],
                                                derived_from=scala_target)

      result_targets = Scalastyle.get_non_synthetic_scala_targets([java_target,
                                                                   scala_target,
                                                                   scala_target_with_java_source,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: ad9f8480c8e08b95d6c217ec4a126bd93b7f376a
Time: 2015-08-31
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/backend/jvm/tasks/test_scalastyle.py
Class Name: ScalastyleTest
Method Name: test_get_non_synthetic_scala_targets


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: 3d7c03ab5a7fcd2459128d9cc849031b28b3f350
Time: 2015-10-12
Author: john.sirois@gmail.com
File Name: tests/python/pants_test/tasks/test_detect_duplicates.py
Class Name: DuplicateDetectorTest
Method Name: test_duplicate_not_found