/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test__static_tuple.py

  • Committer: Jelmer Vernooij
  • Date: 2020-06-10 23:47:24 UTC
  • mfrom: (7490.40.9 work)
  • mto: This revision was merged to the branch mainline in revision 7511.
  • Revision ID: jelmer@jelmer.uk-20200610234724-dk8940wc16l6lihf
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
455
455
        refs = [k1, k2]
456
456
        if self.module is _static_tuple_py:
457
457
            refs.append(self.module.StaticTuple)
458
 
        self.assertEqual(sorted(refs),
459
 
                         sorted(scanner.get_referents(k3)))
 
458
        def key(k):
 
459
            if isinstance(k, type):
 
460
                return (0, k)
 
461
            if isinstance(k, self.module.StaticTuple):
 
462
                return (1, k)
 
463
            raise TypeError(k)
 
464
 
 
465
        self.assertEqual(sorted(refs, key=key),
 
466
                         sorted(scanner.get_referents(k3), key=key))
460
467
 
461
468
    def test_empty_is_singleton(self):
462
469
        key = self.module.StaticTuple()