Fix process_dir bug in filecheck tests

pull/12/head
Dan Puttick 2017-02-23 23:09:00 -05:00
parent bfa257534a
commit c6ecc5e3a3
3 changed files with 4 additions and 4 deletions

View File

@ -576,7 +576,7 @@ class KittenGroomerFileCheck(KittenGroomerBase):
self.process_file(srcpath, dstpath, relative_path) self.process_file(srcpath, dstpath, relative_path)
def run(self): def run(self):
self.process_dir(self.src_root_dir, self.src_dst_dir) self.process_dir(self.src_root_dir, self.dst_root_dir)
def main(kg_implementation, description): def main(kg_implementation, description):

View File

@ -60,7 +60,7 @@ class FileBase(object):
else: else:
try: try:
mt = magic.from_file(self.src_path, mime=True) mt = magic.from_file(self.src_path, mime=True)
# magic will always return something, even if it's just 'data' # note: magic will always return something, even if it's just 'data'
except UnicodeEncodeError as e: except UnicodeEncodeError as e:
# FIXME: The encoding of the file is broken (possibly UTF-16) # FIXME: The encoding of the file is broken (possibly UTF-16)
mt = '' mt = ''

View File

@ -33,13 +33,13 @@ class TestIntegration:
def test_filecheck(self, src_invalid, dst): def test_filecheck(self, src_invalid, dst):
groomer = KittenGroomerFileCheck(src_invalid, dst, debug=True) groomer = KittenGroomerFileCheck(src_invalid, dst, debug=True)
groomer.processdir() groomer.run()
test_description = "filecheck_invalid" test_description = "filecheck_invalid"
save_logs(groomer, test_description) save_logs(groomer, test_description)
def test_filecheck_2(self, src_valid, dst): def test_filecheck_2(self, src_valid, dst):
groomer = KittenGroomerFileCheck(src_valid, dst, debug=True) groomer = KittenGroomerFileCheck(src_valid, dst, debug=True)
groomer.processdir() groomer.run()
test_description = "filecheck_valid" test_description = "filecheck_valid"
save_logs(groomer, test_description) save_logs(groomer, test_description)