jazzband / django-formtools

A set of high-level abstractions for Django forms
https://django-formtools.readthedocs.io
BSD 3-Clause "New" or "Revised" License
784 stars 135 forks source link

Improve testing #230

Open fdemmer opened 1 year ago

fdemmer commented 1 year ago

The latest release broke a documented feature.

Regardless of how this situation will be solved, I propose to improve automated testing. Here are some of my suggested changes.

It includes a currently @unittest.skip() marked test (FormTests.test_form_condition_callable) which leads to a RecursionError due to using get_cleaned_data_for_step in a condition_dict callback.

codecov[bot] commented 1 year ago

Codecov Report

Merging #230 (69cf190) into master (3eb4a43) will increase coverage by 0.38%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
+ Coverage   93.88%   94.26%   +0.38%     
==========================================
  Files          10       10              
  Lines         523      523              
  Branches       66       66              
==========================================
+ Hits          491      493       +2     
+ Misses         19       18       -1     
+ Partials       13       12       -1     
Impacted Files Coverage Δ
formtools/wizard/views.py 94.96% <0.00%> (+0.67%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

stuaxo commented 1 year ago

This could probably be split up so it could be merged more easily.

I'm bound to have missed bits, but for instance there are improvements to tests on -

If you make these separate PRs they can go in on their own + will be easier for others to evaluate; I haven't gone though the commits, but it may be you can create new PRs and cherry pick the relevant commits.

We may even want to split things up a bit in the test class, rather than having one large one.

claudep commented 1 year ago

I guess anyone can make this go forward by creating distinct and reviewable PRs (keeping original author ownership, of course).