discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

Tests: patch os.environ to exclude tests #120

Closed onerandomusername closed 2 years ago

onerandomusername commented 2 years ago

Tests should have a repeatable environment, so this solves that problem by patching os.environ and clearing during testing.

codecov[bot] commented 2 years ago

Codecov Report

Merging #120 (06055b6) into main (30ded20) will increase coverage by 0.16%. The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   70.74%   70.90%   +0.16%     
==========================================
  Files          33       33              
  Lines        1603     1619      +16     
  Branches      197      199       +2     
==========================================
+ Hits         1134     1148      +14     
- Misses        438      439       +1     
- Partials       31       32       +1     
Impacted Files Coverage Δ
tests/modmail/conftest.py 86.95% <87.50%> (+1.24%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 30ded20...06055b6. Read the comment docs.