mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-22 07:19:02 +00:00
Replace assert_true(False) with fail and don't ignore pylint rule W1503
assert_true(False) violates W1503 (redundant-unittest-assert) and is less clear than using fail().
This commit is contained in:
parent
61b53f8995
commit
eff492a8d8
2 changed files with 4 additions and 4 deletions
2
.coafile
2
.coafile
|
@ -22,7 +22,7 @@ pep_ignore = E123,E125,E126,E127,E128,E226,E301,E309,E402,F401,F405,F811,W690
|
|||
pylint_disable = C0103, C0111, C0112, C0123, C0301, C0302, C0325, C0330, C0411, C0412, C0413, C1801,
|
||||
W0102, W0104, W0106, W0108, W0120, W0201, W0212, W0221, W0231, W0401, W0404,
|
||||
W0511, W0603, W0611, W0612, W0613, W0614, W0621, W0622, W0702, W0703,
|
||||
W1201, W1202, W1401, W1503,
|
||||
W1201, W1202, W1401,
|
||||
R0101, R0201, R0204, R0901, R0902, R0903, R0904, R0911, R0912, R0913, R0914, R0915, R0916, R1701, R1704, R1705, R1706,
|
||||
E0102, E0202, E0401, E0601, E0611, E0702, E1101, E1102, E1120, E1129, E1130
|
||||
pydocstyle_ignore = D100, D101, D102, D103, D104, D105, D200, D201, D202, D203, D204, D205, D209, D210,
|
||||
|
|
|
@ -2800,7 +2800,7 @@ def test_missing_file_chunk(self):
|
|||
repository.delete(killed_chunk.id)
|
||||
break
|
||||
else:
|
||||
self.assert_true(False) # should not happen
|
||||
self.fail('should not happen')
|
||||
repository.commit()
|
||||
self.cmd('check', self.repository_location, exit_code=1)
|
||||
output = self.cmd('check', '--repair', self.repository_location, exit_code=0)
|
||||
|
@ -2818,7 +2818,7 @@ def test_missing_file_chunk(self):
|
|||
self.assert_not_in(killed_chunk, item.chunks)
|
||||
break
|
||||
else:
|
||||
self.assert_true(False) # should not happen
|
||||
self.fail('should not happen')
|
||||
# do a fresh backup (that will include the killed chunk)
|
||||
with patch.object(ChunkBuffer, 'BUFFER_SIZE', 10):
|
||||
self.create_src_archive('archive3')
|
||||
|
@ -2835,7 +2835,7 @@ def test_missing_file_chunk(self):
|
|||
self.assert_equal(valid_chunks, item.chunks)
|
||||
break
|
||||
else:
|
||||
self.assert_true(False) # should not happen
|
||||
self.fail('should not happen')
|
||||
# list is also all-healthy again
|
||||
output = self.cmd('list', '--format={health}#{path}{LF}', self.repository_location + '::archive1', exit_code=0)
|
||||
self.assert_not_in('broken#', output)
|
||||
|
|
Loading…
Reference in a new issue