(analyzer_mock, op, left, right)
| 514 | )) |
| 515 | @mock.patch("aura.package_analyzer.Analyzer.analyze", return_value=[(), ()]) |
| 516 | def test_diffs_analyzed(analyzer_mock, op, left, right): |
| 517 | sample_diff = diff.Diff( |
| 518 | operation=op, |
| 519 | a_scan=left, |
| 520 | b_scan=right |
| 521 | ) |
| 522 | |
| 523 | d = diff.DiffAnalyzer() |
| 524 | d.diffs = [sample_diff] |
| 525 | d.analyze_changes() |
| 526 | |
| 527 | if right is None and left is None: |
| 528 | analyzer_mock.assert_not_called() |
| 529 | return |
| 530 | |
| 531 | if right is not None and left is not None and right.md5 == left.md5: |
| 532 | analyzer_mock.assert_not_called() |
| 533 | return |
| 534 | |
| 535 | analyzer_mock.assert_called() |
| 536 | |
| 537 | if right: |
| 538 | analyzer_mock.assert_any_call(location=right) |
| 539 | |
| 540 | if left: |
| 541 | analyzer_mock.assert_any_call(location=left) |
nothing calls this directly
no test coverage detected