getappmap / getappmap/appmap-python

labeling tests fail intermittently

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

appmap-python bug
Dominant language
Python
Stars
104
Forks
17
PR merge metrics
No merged PRs in 30d

Description

The approach taken in test_labels.py and test_generation.py isn't reliable. Sometimes, monkeypatching geneation.FuncEntry.to_dict doesn't work (maybe because it's not patching the class that's actually used for generation). This results is the test passing, even if the expected condition hasn't been met, because the test's check_labels function is never called.

We should change the tests so that they examine the appmap after it's generated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test_labels.py and test_generation.py, focusing on the monkeypatch of geneation.FuncEntry.to_dict and the check_labels function. Run the affected tests and inspect the generated AppMap afterward rather than relying on the patch. Done means the tests validate labels from the generated AppMap and fail when the expected condition is not met.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.