Merge pull request #73 from aeikenberry/master

Adds test for -e
This commit is contained in:
Dylan Araps 2017-08-03 15:12:45 +10:00 committed by GitHub
commit 1f1c21e788

View File

@ -1,7 +1,9 @@
"""Test __main__ functions."""
import unittest
from unittest.mock import MagicMock
from pywal import __main__
from pywal import reload
from pywal.settings import CACHE_DIR
@ -14,6 +16,13 @@ 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)
self.assertFalse(reload.env.called)
if __name__ == "__main__":
unittest.main()