79d358a10723d9a1c9cef7aed16ccc5a693f3f6c,tests/python/pants_test/backend/python/tasks/test_pytest_run.py,PytestTest,test_coverage_auto_option_no_explicit_coverage,#PytestTest#,608
Before Change
def one(): // line 1
return 1 // line 2
).strip())
util = self.make_target(spec="src/python/util",
target_type=PythonLibrary)
self.create_file(
"test/python/util/test_math.py",
dedent(
import unittest
from util import math
class MathTest(unittest.TestCase):
def test_one(self):
self.assertEqual(1, math.one())
))
test = self.make_target(spec="test/python/util",
target_type=PythonTests,
dependencies=[util])
covered_path = os.path.join(self.build_root, "src/python/util/math.py")
all_statements, not_run_statements = self.run_coverage_auto(targets=[test],
covered_path=covered_path)
After Change
self.assertEqual([], not_run_statements)
@ensure_cached(PytestRun, expected_num_artifacts=1)
def test_coverage_auto_option_no_explicit_coverage(self):
init_subsystem(Target.Arguments)
init_subsystem(SourceRootConfig)
self.add_to_build_file("src/python/util", "python_library()")
self.create_file(
"src/python/util/math.py",
dedent(
def one(): // line 1
return 1 // line 2
).strip())
self.add_to_build_file("test/python/util", "python_tests(dependencies = ["src/python/util"])")
self.create_file(
"test/python/util/test_math.py",
dedent(
import unittest
from util import math
class MathTest(unittest.TestCase):
def test_one(self):
self.assertEqual(1, math.one())
))
test = self.target("test/python/util")
covered_path = os.path.join(self.build_root, "src/python/util/math.py")
all_statements, not_run_statements = self.run_coverage_auto(targets=[test],
covered_path=covered_path)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: pantsbuild/pants
Commit Name: 79d358a10723d9a1c9cef7aed16ccc5a693f3f6c
Time: 2018-06-11
Author: dawagner@gmail.com
File Name: tests/python/pants_test/backend/python/tasks/test_pytest_run.py
Class Name: PytestTest
Method Name: test_coverage_auto_option_no_explicit_coverage
Project Name: pantsbuild/pants
Commit Name: 79d358a10723d9a1c9cef7aed16ccc5a693f3f6c
Time: 2018-06-11
Author: dawagner@gmail.com
File Name: tests/python/pants_test/backend/jvm/tasks/test_binary_create.py
Class Name: TestBinaryCreate
Method Name: test_jvm_binaries_deploy_excludes
Project Name: pantsbuild/pants
Commit Name: 79d358a10723d9a1c9cef7aed16ccc5a693f3f6c
Time: 2018-06-11
Author: dawagner@gmail.com
File Name: tests/python/pants_test/backend/python/tasks/test_pytest_run.py
Class Name: PytestTest
Method Name: test_coverage_auto_option_no_explicit_coverage
Project Name: pantsbuild/pants
Commit Name: 79d358a10723d9a1c9cef7aed16ccc5a693f3f6c
Time: 2018-06-11
Author: dawagner@gmail.com
File Name: tests/python/pants_test/backend/python/tasks/test_pytest_run.py
Class Name: PytestTest
Method Name: test_coverage_auto_option_no_explicit_coverage_idiosyncratic_layout