2017-07-23 14:31:20 +02:00
|
|
|
"""Test __main__ functions."""
|
|
|
|
import unittest
|
2017-07-23 15:31:16 +02:00
|
|
|
|
2017-07-23 14:31:20 +02:00
|
|
|
from pywal import __main__
|
2017-07-24 14:29:20 +02:00
|
|
|
from pywal.settings import CACHE_DIR
|
2017-07-23 14:31:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
class TestMain(unittest.TestCase):
|
|
|
|
"""Test the gen_colors functions."""
|
|
|
|
|
2017-07-23 15:31:16 +02:00
|
|
|
def test_clean(self):
|
|
|
|
"""> Test arg parsing (-c)"""
|
|
|
|
args = __main__.get_args(["-c"])
|
|
|
|
__main__.process_args(args)
|
2017-07-24 14:29:20 +02:00
|
|
|
self.assertFalse((CACHE_DIR / "schemes").is_dir())
|
2017-07-23 15:31:16 +02:00
|
|
|
|
2017-07-23 14:33:43 +02:00
|
|
|
|
2017-07-23 14:31:20 +02:00
|
|
|
if __name__ == "__main__":
|
|
|
|
unittest.main()
|