MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / test_diffs_analyzed

Function test_diffs_analyzed

tests/test_diff.py:516–541  ·  view source on GitHub ↗
(analyzer_mock, op, left, right)

Source from the content-addressed store, hash-verified

514))
515@mock.patch("aura.package_analyzer.Analyzer.analyze", return_value=[(), ()])
516def 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)

Callers

nothing calls this directly

Calls 1

analyze_changesMethod · 0.95

Tested by

no test coverage detected