mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-25 09:23:08 +01:00
adds test for -e
This commit is contained in:
parent
282605376d
commit
d5dfdc8193
@ -1,7 +1,8 @@
|
||||
"""Test __main__ functions."""
|
||||
import unittest
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from pywal import __main__
|
||||
from pywal import __main__, reload
|
||||
from pywal.settings import CACHE_DIR
|
||||
|
||||
|
||||
@ -14,6 +15,12 @@ class TestMain(unittest.TestCase):
|
||||
__main__.process_args(args)
|
||||
self.assertFalse((CACHE_DIR / "schemes").is_dir())
|
||||
|
||||
def test_args_e(self):
|
||||
"""> Test arg parsing (-e)"""
|
||||
reload.env = MagicMock()
|
||||
args = __main__.get_args(["-e"])
|
||||
__main__.process_args(args)
|
||||
reload.env.assert_not_called()
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user