New testing failure duplicity 3.0.2
Scott Hannahs via Duplicity-talk <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.duplicity.general |
|---|---|
| Message-ID | <[email protected]> |
Now that I had decided to move on from 3.0.0 to 3.0.2, I figured that would be a trivial update. I don’t think that means what I think it does…. :-)
But now 9 tests fail with no change except using the 3.0.2 source instead of the 3.0.0 source. This is new with the simple minor bump in versions.
testing/unit/test_file_naming.py::FileNaming::test_suffix FAILED [ 71%]
...
testing/unit/test_file_naming.py::FileNamingPrefixes::test_basic PASSED [ 73%]
testing/unit/test_collections.py::CollectionTest::test_get_olderthan FAILED [ 73%]
testing/unit/test_collections.py::CollectionTest::test_collections_status FAILED [ 73%]
testing/unit/test_collections.py::CollectionTest::test_get_extraneous FAILED [ 73%]
testing/unit/test_collections.py::CollectionTest::test_sig_chains2 FAILED [ 73%]
testing/unit/test_collections.py::CollectionTest::test_sig_chain FAILED [ 74%]
testing/unit/test_collections.py::CollectionTest::test_sig_chains FAILED [ 74%]
testing/unit/test_collections.py::CollectionTest::test_sigchain_fileobj FAILED [ 74%]
testing/unit/test_collections.py::CollectionTest::test_backup_chains FAILED [ 74%]
testing/unit/test_diffdir.py::DDTest::test_empty_diff2 PASSED [ 74%]
The whole error list is after the signature. The first error seems to be with a time string function?
-Scott
=================================== FAILURES ===================================
____________________________ FileNaming.test_suffix ____________________________
self = <testing.unit.test_file_naming.FileNaming testMethod=test_suffix>
def test_suffix(self):
"""Test suffix (encrypt/compressed) encoding and generation"""
file_naming.prepare_regex(force=True)
> filename = file_naming.get("inc", manifest=1, gzipped=1)
self = <testing.unit.test_file_naming.FileNaming testMethod=test_suffix>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_file_naming.py:102:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
type = 'inc', volume_number = None, manifest = 1, encrypted = False, gzipped = 1
partial = False
def get(
type,
volume_number=None,
manifest=False, # pylint: disable=redefined-builtin
encrypted=False,
gzipped=False,
partial=False,
):
"""
Return duplicity filename of specified type
type can be "full", "inc", "full-sig", "new-sig", "full-stat", "inc-stat". volume_number
can be given with the full and inc types. If manifest is true the
filename is of a full or inc manifest file.
"""
> assert dup_time.curtimestr
E AssertionError
encrypted = False
gzipped = 1
manifest = 1
partial = False
type = 'inc'
volume_number = None
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/duplicity/file_naming.py:253: AssertionError
______________________ CollectionTest.test_get_olderthan _______________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_get_olderthan>
def test_get_olderthan(self):
"""Test getting list of files older than a certain time"""
cs = self.get_filelist2_cs()
oldsets = cs.get_older_than(dup_time.genstrtotime("2002-05-01T16:17:01-07:00"))
oldset_times = [s.get_time() for s in oldsets]
right_times = [dup_time.genstrtotime("2001-01-01T16:17:01-07:00")]
> assert oldset_times == right_times, [oldset_times, right_times]
E AssertionError: [[], [978391021]]
E assert [] == [978391021]
E Right contains one more item: 978391021
E Full diff:
E - [978391021]
E + []
cs = <duplicity.dup_collections.CollectionsStatus object at 0x1102d7eb0>
oldset_times = []
oldsets = []
right_times = [978391021]
self = <testing.unit.test_collections.CollectionTest testMethod=test_get_olderthan>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:244: AssertionError
____________________ CollectionTest.test_collections_status ____________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_collections_status>
def test_collections_status(self):
"""Test CollectionStatus object's set_values()"""
def check_cs(cs):
"""Check values of collections status"""
assert cs.values_set
assert cs.matched_chain_pair
assert cs.matched_chain_pair[0].end_time == 1029826800
assert len(cs.all_backup_chains) == 1, cs.all_backup_chains
cs = dup_collections.CollectionsStatus(self.real_backend, config.archive_dir_path, "full").set_values()
> check_cs(cs)
check_cs = <function CollectionTest.test_collections_status.<locals>.check_cs at 0x11049e7a0>
cs = <duplicity.dup_collections.CollectionsStatus object at 0x1102d6c80>
self = <testing.unit.test_collections.CollectionTest testMethod=test_collections_status>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cs = <duplicity.dup_collections.CollectionsStatus object at 0x1102d6c80>
def check_cs(cs):
"""Check values of collections status"""
assert cs.values_set
> assert cs.matched_chain_pair
E assert None
E + where None = <duplicity.dup_collections.CollectionsStatus object at 0x1102d6c80>.matched_chain_pair
cs = <duplicity.dup_collections.CollectionsStatus object at 0x1102d6c80>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:126: AssertionError
______________________ CollectionTest.test_get_extraneous ______________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_get_extraneous>
def test_get_extraneous(self):
"""Test the listing of extraneous files"""
cs = self.get_filelist2_cs()
> assert len(cs.orphaned_backup_sets) == 1, cs.orphaned_backup_sets
E AssertionError: []
E assert 0 == 1
E + where 0 = len([])
E + where [] = <duplicity.dup_collections.CollectionsStatus object at 0x11023e740>.orphaned_backup_sets
cs = <duplicity.dup_collections.CollectionsStatus object at 0x11023e740>
self = <testing.unit.test_collections.CollectionTest testMethod=test_get_extraneous>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:216: AssertionError
_______________________ CollectionTest.test_sig_chains2 ________________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains2>
def test_sig_chains2(self):
"""Test making signature chains from filename list on backend"""
cs = dup_collections.CollectionsStatus(self.archive_dir_backend, config.archive_dir_path, "full")
chains, orphaned_paths = cs.get_signature_chains(local=None)
> self.sig_chains_helper(chains, orphaned_paths)
chains = []
cs = <duplicity.dup_collections.CollectionsStatus object at 0x10fb3e3e0>
orphaned_paths = []
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains2>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:153:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains2>
chains = [], orphaned_paths = []
def sig_chains_helper(self, chains, orphaned_paths):
"""Test chains and orphaned_paths values for two above tests"""
if orphaned_paths:
for op in orphaned_paths:
print(op)
assert 0
> assert len(chains) == 1, chains
E AssertionError: []
E assert 0 == 1
E + where 0 = len([])
chains = []
orphaned_paths = []
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains2>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:161: AssertionError
________________________ CollectionTest.test_sig_chain _________________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chain>
def test_sig_chain(self):
"""Test a single signature chain"""
chain = dup_collections.SignatureChain(1, config.archive_dir_path)
for filename in local_sigchain_filename_list:
> assert chain.add_filename(filename)
E AssertionError: assert None
E + where None = <bound method SignatureChain.add_filename of <duplicity.dup_collections.SignatureChain object at 0x11023ceb0>>(b'duplicity-full-signatures.2002-08-17T16:17:01-07:00.sigtar.gz')
E + where <bound method SignatureChain.add_filename of <duplicity.dup_collections.SignatureChain object at 0x11023ceb0>> = <duplicity.dup_collections.SignatureChain object at 0x11023ceb0>.add_filename
chain = <duplicity.dup_collections.SignatureChain object at 0x11023ceb0>
filename = b'duplicity-full-signatures.2002-08-17T16:17:01-07:00.sigtar.gz'
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chain>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:138: AssertionError
________________________ CollectionTest.test_sig_chains ________________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains>
def test_sig_chains(self):
"""Test making signature chains from filename list"""
cs = dup_collections.CollectionsStatus(None, config.archive_dir_path, "full")
chains, orphaned_paths = cs.get_signature_chains(local=1)
> self.sig_chains_helper(chains, orphaned_paths)
chains = []
cs = <duplicity.dup_collections.CollectionsStatus object at 0x10fb3d7b0>
orphaned_paths = []
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:147:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains>
chains = [], orphaned_paths = []
def sig_chains_helper(self, chains, orphaned_paths):
"""Test chains and orphaned_paths values for two above tests"""
if orphaned_paths:
for op in orphaned_paths:
print(op)
assert 0
> assert len(chains) == 1, chains
E AssertionError: []
E assert 0 == 1
E + where 0 = len([])
chains = []
orphaned_paths = []
self = <testing.unit.test_collections.CollectionTest testMethod=test_sig_chains>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:161: AssertionError
_____________________ CollectionTest.test_sigchain_fileobj _____________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_sigchain_fileobj>
@pytest.mark.usefixtures("redirect_stdin")
def test_sigchain_fileobj(self):
"""Test getting signature chain fileobjs from archive_dir_path"""
self.set_gpg_profile()
> self.sigchain_fileobj_check_list(self.sigchain_fileobj_get(1))
self = <testing.unit.test_collections.CollectionTest testMethod=test_sigchain_fileobj>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:199:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <testing.unit.test_collections.CollectionTest testMethod=test_sigchain_fileobj>
local = 1
def sigchain_fileobj_get(self, local):
"""Return chain, local if local is true with filenames added"""
if local:
chain = dup_collections.SignatureChain(1, config.archive_dir_path)
for filename in local_sigchain_filename_list:
> assert chain.add_filename(filename)
E AssertionError: assert None
E + where None = <bound method SignatureChain.add_filename of <duplicity.dup_collections.SignatureChain object at 0x10fb3f4c0>>(b'duplicity-full-signatures.2002-08-17T16:17:01-07:00.sigtar.gz')
E + where <bound method SignatureChain.add_filename of <duplicity.dup_collections.SignatureChain object at 0x10fb3f4c0>> = <duplicity.dup_collections.SignatureChain object at 0x10fb3f4c0>.add_filename
chain = <duplicity.dup_collections.SignatureChain object at 0x10fb3f4c0>
filename = b'duplicity-full-signatures.2002-08-17T16:17:01-07:00.sigtar.gz'
local = 1
self = <testing.unit.test_collections.CollectionTest testMethod=test_sigchain_fileobj>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:169: AssertionError
______________________ CollectionTest.test_backup_chains _______________________
self = <testing.unit.test_collections.CollectionTest testMethod=test_backup_chains>
def test_backup_chains(self):
"""Test basic backup chain construction"""
random.shuffle(filename_list1)
cs = dup_collections.CollectionsStatus(None, config.archive_dir_path, "full")
chains, orphaned, incomplete = cs.get_backup_chains(filename_list1)
if len(chains) != 1 or len(orphaned) != 0:
print(chains)
print(orphaned)
> assert 0
E assert 0
chains = []
cs = <duplicity.dup_collections.CollectionsStatus object at 0x1101ac5b0>
incomplete = []
orphaned = []
self = <testing.unit.test_collections.CollectionTest testMethod=test_backup_chains>
/opt/sw/src/fink.build/duplicity-3.0.2-1/duplicity-rel.3.0.2/testing/unit/test_collections.py:113: AssertionError
_______________________________________________
Duplicity-talk mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk