blurstudio / hab

A application environment and launcher
GNU Lesser General Public License v3.0
25 stars 3 forks source link

Berkheimer/issue 45 user prefs expire #48

Closed ghost closed 1 year ago

ghost commented 1 year ago

Checklist

Types of Changes

Proposed Changes

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

MHendricks commented 1 year ago

Unfortunately I don't have the coverage comment system working so the report is added automatically, but can you add tests covering the new code. Specifically hab/user_prefs.py line 17. The other files with missing coverage don't have tests setup yet.

Name                             Stmts   Miss  Cover   Missing
--------------------------------------------------------------
hab/__init__.py                    143      1    99%   264
hab/__main__.py                      5      5     0%   4-14
hab/cli.py                         197    197     0%   1-537
hab/errors.py                       18      0   100%
hab/formatter.py                    37      0   100%
hab/merge_dict.py                   80      0   100%
hab/parsers/__init__.py             10      0   100%
hab/parsers/config.py               17      0   100%
hab/parsers/distro.py               21      2    90%   15-16
hab/parsers/distro_version.py       60      0   100%
hab/parsers/flat_config.py         135      0   100%
hab/parsers/hab_base.py            331     15    95%   436, 652, 712-730
hab/parsers/meta.py                 25      0   100%
hab/parsers/placeholder.py           7      0   100%
hab/parsers/unfrozen_config.py      30      0   100%
hab/site.py                         73      0   100%
hab/solvers.py                      96      0   100%
hab/user_prefs.py                  117      1    99%   17
hab/utils.py                       236      4    98%   184, 267, 449, 521
--------------------------------------------------------------
TOTAL                             1638    225    86%

In this case that is just the guts of the __str__ method, so just make sure it returns the correct value for expected inputs. Now that I think about it, it probably needs to have a special case for None. I'm thinking it should return a empty string, but I'm not sure.