mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 09:39:16 +00:00
add pyflakes and fix errors
This commit is contained in:
@@ -12,7 +12,7 @@ import tempfile
|
||||
|
||||
from dotdrop.options import Options
|
||||
from dotdrop.linktypes import LinkTypes
|
||||
from dotdrop.utils import *
|
||||
from dotdrop.utils import strip_home
|
||||
|
||||
TMPSUFFIX = '.dotdrop'
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ class TestCompare(unittest.TestCase):
|
||||
comp = Comparator()
|
||||
results = {}
|
||||
for dotfile in dotfiles:
|
||||
path = os.path.expanduser(dotfile.dst)
|
||||
ret, insttmp = inst.install_to_temp(t, tmp, dotfile.src,
|
||||
dotfile.dst)
|
||||
if not ret:
|
||||
@@ -42,7 +43,6 @@ class TestCompare(unittest.TestCase):
|
||||
continue
|
||||
diff = comp.compare(insttmp, dotfile.dst,
|
||||
ignore=['whatever', 'whatelse'])
|
||||
path = os.path.expanduser(dotfile.dst)
|
||||
results[path] = diff == ''
|
||||
return results
|
||||
|
||||
|
||||
@@ -8,11 +8,9 @@ basic unittest for the config parser
|
||||
import unittest
|
||||
import os
|
||||
import yaml
|
||||
import tempfile
|
||||
import shutil
|
||||
|
||||
from dotdrop.config import Cfg
|
||||
from tests.helpers import *
|
||||
from tests.helpers import get_tempdir, clean, create_fake_config
|
||||
|
||||
|
||||
class TestConfig(unittest.TestCase):
|
||||
@@ -88,7 +86,6 @@ class TestConfig(unittest.TestCase):
|
||||
self.assertTrue(conf is not None)
|
||||
|
||||
# test profile
|
||||
opts = conf.get_settings()
|
||||
profiles = conf.get_profiles()
|
||||
self.assertTrue(pf1key in profiles)
|
||||
self.assertTrue(pf2key in profiles)
|
||||
|
||||
@@ -13,9 +13,12 @@ from dotdrop.dotdrop import cmd_importer
|
||||
from dotdrop.dotdrop import cmd_list_profiles
|
||||
from dotdrop.dotdrop import cmd_list_files
|
||||
from dotdrop.dotdrop import cmd_update
|
||||
from dotdrop.config import Cfg
|
||||
from dotdrop.linktypes import LinkTypes
|
||||
|
||||
from tests.helpers import *
|
||||
from tests.helpers import get_path_strip_version, edit_content, \
|
||||
load_options, create_random_file, \
|
||||
clean, get_string, get_dotfile_from_yaml, \
|
||||
get_tempdir, create_fake_config, create_dir
|
||||
|
||||
|
||||
class TestImport(unittest.TestCase):
|
||||
|
||||
@@ -7,15 +7,15 @@ basic unittest for the compare function
|
||||
|
||||
import unittest
|
||||
import os
|
||||
import yaml
|
||||
|
||||
from dotdrop.config import Cfg
|
||||
from dotdrop.dotdrop import cmd_list_profiles
|
||||
from dotdrop.dotdrop import cmd_list_files
|
||||
from dotdrop.dotdrop import cmd_detail
|
||||
from dotdrop.dotdrop import cmd_importer
|
||||
|
||||
from tests.helpers import *
|
||||
from tests.helpers import create_dir, get_string, get_tempdir, \
|
||||
create_random_file, load_options, \
|
||||
create_fake_config, clean
|
||||
|
||||
|
||||
class TestListings(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user