Skip to content

Unit tests for AnswersMap & unit test directory#2454

Open
RR5555 wants to merge 2 commits intocopier-org:masterfrom
RR5555:unittest
Open

Unit tests for AnswersMap & unit test directory#2454
RR5555 wants to merge 2 commits intocopier-org:masterfrom
RR5555:unittest

Conversation

@RR5555
Copy link
Contributor

@RR5555 RR5555 commented Jan 12, 2026

This PR adds unit tests for AnswersMap from _user_data.py.

It creates a test/unittest directory for unit test files, and starts it with test__user_data.py.

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.15%. Comparing base (3ae340d) to head (8981621).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2454      +/-   ##
==========================================
- Coverage   97.26%   97.15%   -0.12%     
==========================================
  Files          55       56       +1     
  Lines        6299     6329      +30     
==========================================
+ Hits         6127     6149      +22     
- Misses        172      180       +8     
Flag Coverage Δ
unittests 97.15% <100.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sisp
Copy link
Member

sisp commented Jan 19, 2026

Thanks for your initiative towards improving our testing, @RR5555! 👍

TBH, I'm a bit hesitant about adding many unit tests – especially for this very internal AnswersMap class – because (a) @yajo advocates full application tests in a Podcast (approx. 39 min into the discussion) about Copier, and (b) I'm not sure about the added value given the extensive test suite we have.

@yajo
Copy link
Member

yajo commented Feb 27, 2026

I agree with @sisp. Please could you explain why did you add this proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants