mirror of https://github.com/tLDP/python-tldp
pep8/pyflakes corrections
This commit is contained in:
parent
ef355ad8fb
commit
875e2b2c23
|
@ -3,15 +3,9 @@ from __future__ import absolute_import, division, print_function
|
|||
|
||||
import os
|
||||
import time
|
||||
import errno
|
||||
import random
|
||||
import shutil
|
||||
|
||||
try:
|
||||
from types import SimpleNamespace
|
||||
except ImportError:
|
||||
from utils import SimpleNamespace
|
||||
|
||||
from tldp.outputs import OutputNamingConvention
|
||||
from tldptesttools import TestToolsFilesystem
|
||||
|
||||
|
@ -52,7 +46,7 @@ class TestSourceDocSkeleton(object):
|
|||
shutil.copy(content, fname)
|
||||
else:
|
||||
with open(fname, 'w') as f:
|
||||
f.write(content)
|
||||
f.write(content)
|
||||
|
||||
|
||||
class TestInventoryBase(TestToolsFilesystem):
|
||||
|
@ -154,7 +148,7 @@ class TestInventoryUsage(TestInventoryBase):
|
|||
self.assertEquals(0, len(i.orphans))
|
||||
self.assertEquals(0, len(i.broken))
|
||||
|
||||
def test_detect_status_stale(self):
|
||||
def test_detect_status_broken(self):
|
||||
ex = random.choice(example.sources)
|
||||
self.add_broken('Frobnitz-HOWTO', ex)
|
||||
i = Inventory(self.pubdir, self.sourcedirs)
|
||||
|
|
|
@ -67,7 +67,7 @@ class TestOutputDirectory(TestToolsFilesystem):
|
|||
for prop in o.expected:
|
||||
fname = getattr(o, prop, None)
|
||||
assert fname is not None
|
||||
with open(fname, 'w') as f:
|
||||
with open(fname, 'w'):
|
||||
pass
|
||||
self.assertTrue(o.iscomplete)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ from tldptesttools import TestToolsFilesystem
|
|||
|
||||
# -- SUT
|
||||
from tldp.utils import makefh, which, execute
|
||||
from tldp.utils import statfiles, att_statinfo
|
||||
from tldp.utils import statfiles
|
||||
|
||||
|
||||
class Test_execute(TestToolsFilesystem):
|
||||
|
@ -82,7 +82,6 @@ class Test_statfiles(unittest.TestCase):
|
|||
self.assertTrue(os.path.basename(__file__) in statinfo)
|
||||
|
||||
def test_statfiles_file_abs(self):
|
||||
here = os.path.dirname(os.path.abspath(__file__))
|
||||
statinfo = statfiles(__file__)
|
||||
self.assertIsInstance(statinfo, dict)
|
||||
self.assertTrue(__file__ in statinfo)
|
||||
|
@ -100,6 +99,7 @@ class Test_att_statinfo(unittest.TestCase):
|
|||
def test_max_mtime(self):
|
||||
pass
|
||||
|
||||
|
||||
class Test_makefh(unittest.TestCase):
|
||||
|
||||
def test_makefh(self):
|
||||
|
|
Loading…
Reference in New Issue