mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 00:59:18 +00:00
refactor the parsing
This commit is contained in:
@@ -9,7 +9,7 @@ import unittest
|
||||
from unittest.mock import MagicMock, patch
|
||||
import filecmp
|
||||
|
||||
from dotdrop.config import Cfg
|
||||
from dotdrop.cfg_aggregator import CfgAggregator as Cfg
|
||||
from tests.helpers import (clean, create_dir, create_fake_config,
|
||||
create_random_file, get_string, get_tempdir,
|
||||
load_options, populate_fake_config)
|
||||
@@ -89,7 +89,7 @@ exec bspwm
|
||||
f1, c1 = create_random_file(tmp)
|
||||
dst1 = os.path.join(dst, get_string(6))
|
||||
d1 = Dotfile(get_string(5), dst1, os.path.basename(f1))
|
||||
# fake a print
|
||||
# fake a __str__
|
||||
self.assertTrue(str(d1) != '')
|
||||
f2, c2 = create_random_file(tmp)
|
||||
dst2 = os.path.join(dst, get_string(6))
|
||||
@@ -178,7 +178,7 @@ exec bspwm
|
||||
dotfiles = [d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, ddot]
|
||||
self.fake_config(confpath, dotfiles,
|
||||
profile, tmp, [act1], [tr])
|
||||
conf = Cfg(confpath)
|
||||
conf = Cfg(confpath, profile)
|
||||
self.assertTrue(conf is not None)
|
||||
|
||||
# install them
|
||||
@@ -305,7 +305,7 @@ exec bspwm
|
||||
# create the importing base config file
|
||||
importing_path = create_fake_config(tmp,
|
||||
configname='config.yaml',
|
||||
import_configs=('config-*.yaml',),
|
||||
import_configs=['config-2.yaml'],
|
||||
**importing['config'])
|
||||
|
||||
# edit the imported config
|
||||
|
||||
Reference in New Issue
Block a user