deadc0de6 / dotdrop

Save your dotfiles once, deploy them everywhere
https://dotdrop.readthedocs.io
GNU General Public License v3.0
1.78k stars 105 forks source link

Fix test_def_link tests by adding missing mock to open() call #372

Closed samueloph closed 1 year ago

samueloph commented 1 year ago

I'm reviewing someone's packaging of dotdrop for Debian and spotted this issue.

The mock was setup to only return the mocked data once, but the function is called twice under cfg_yaml.py, and it breaks at __yaml_load as there's no mock anymore.

I'm also not sure why this wasn't caught by the CI system you're using on Github. There doesn't seems to be evidence that this test is running (I've tried searching for "link_on_import: link" in the test logs).

deadc0de6 commented 1 year ago

Good catch, thanks a lot! It seems env variables were influencing the tests, I'm fixing that once I've merged your PR. @samueloph this debian package?

coveralls commented 1 year ago

Coverage Status

Coverage increased (+0.02%) to 86.174% when pulling f13562371ce46e62fab207ae098a95d6e6be9db0 on Debian:debian/samueloph/fix_test_def_link into f013397c02a71751d1303cddb204f2bd7c439032 on deadc0de6:master.

samueloph commented 1 year ago

@deadc0de6 yes, that package, I'm not sure if Guilherme has a GitHub account so I didn't link his username.

Thank you for merging.