INNER CODE UNIT · Python

print_coverage

usnistgov/OSCAL · src/specifications/profile-resolution/spec-tester.py:271

    def print_coverage(self):
        """
        Utility method that prints the test coverage against the spec
        """
        covered_tests: Dict[str, Set[str]] = {}

        for test in self.tests:
            if test["section_id"] not in covered_tests:
                covered_tests[test["section_id"]] = set()
            covered_tests[test["section_id"]].add(test["requirement_id"])

        for section_id, section_head in self.section_heads.items():
            requirements = set(self.section_requirements[section_id].keys())
            tested_requirements = covered_tests.get(section_id, set())
            covered_requirements = tested_requirements.intersection(
                requirements)
            uncovered_requirements = requirements.difference(
                tested_requirements)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…