Skip to content

Commit

Permalink
small fix for unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L. <[email protected]>
  • Loading branch information
lrq3000 committed Dec 7, 2015
1 parent f7cb3b0 commit e395b33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyFileFixity/_infos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__email__ = '[email protected]'

# Definition of the version number
version_info = 2, 3, 0 # major, minor, patch, extra
version_info = 2, 3, 1 # major, minor, patch, extra

# Nice string for the version (mimic how IPython composes its version str)
__version__ = '-'.join(map(str, version_info)).replace('-', '.').strip('-')
2 changes: 1 addition & 1 deletion pyFileFixity/replication_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def majority_vote_byte_scan(relfilepath, fileslist, outpath, blocksize=65535, de

# Errors signaling
if errors:
error_msg = "Unrecoverable corruptions (because of ambiguity) in file %s on characters: %s." % (relfilepath, [hex(x) for x in errors]) # Signal to user that this file has unrecoverable corruptions (he may try to fix the bits manually or with his own script)
error_msg = "Unrecoverable corruptions (because of ambiguity) in file %s on characters: %s." % (relfilepath, [hex(int(x)) for x in errors]) # Signal to user that this file has unrecoverable corruptions (he may try to fix the bits manually or with his own script)
return (1, error_msg) # return an error
# Close all input files
for fh in fileshandles:
Expand Down
2 changes: 1 addition & 1 deletion pyFileFixity/tests/test_replication_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def quote_paths(inputpaths):
tamper_file(fileout2[2], 0, "A")

# Replication repair using rfigc database to check results
res3 = "filepath|dir1|dir2|dir3|dir4|hash-correct|error_code|errors\ntestaa.txt|X|X|-|X|KO|KO| File could not be totally repaired according to rfigc database.\ntuxsmall.jpg|X|X|X|X|OK|KO|Unrecoverable corruptions (because of ambiguity) in file tuxsmall.jpg on characters: ['0xaL']. But merged file is correct according to rfigc database.\nsub/testsub.txt|-|-|O|-|OK|OK|-\n"
res3 = "filepath|dir1|dir2|dir3|dir4|hash-correct|error_code|errors\ntestaa.txt|X|X|-|X|KO|KO| File could not be totally repaired according to rfigc database.\ntuxsmall.jpg|X|X|X|X|OK|KO|Unrecoverable corruptions (because of ambiguity) in file tuxsmall.jpg on characters: ['0xa']. But merged file is correct according to rfigc database.\nsub/testsub.txt|-|-|O|-|OK|OK|-\n"
ptee = StringIO()
errcode = rep.synchronize_files(inputpaths, outpath, database=filedb, report_file=report_file, ptee=ptee)
assert errcode == 1
Expand Down

0 comments on commit e395b33

Please sign in to comment.