/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-01 21:57:00 UTC
  • mfrom: (7490.39.3 move-launchpad)
  • Revision ID: breezy.the.bot@gmail.com-20200601215700-joxuzo6w172gq74v
Move launchpad hoster support to the launchpad plugin.

Merged from https://code.launchpad.net/~jelmer/brz/move-launchpad/+merge/384931

Show diffs side-by-side

added added

removed removed

Lines of Context:
443
443
            refs = strs + [self.module.StaticTuple]
444
444
        else:
445
445
            refs = strs
446
 
        def key(k):
447
 
            if isinstance(k, type):
448
 
                return (0, k)
449
 
            if isinstance(k, str):
450
 
                return (1, k)
451
 
            raise TypeError(k)
452
 
        self.assertEqual(
453
 
            sorted(refs, key=key),
454
 
            sorted(scanner.get_referents(k), key=key))
 
446
        self.assertEqual(sorted(refs), sorted(scanner.get_referents(k)))
455
447
 
456
448
    def test_nested_referents(self):
457
449
        self.requireFeature(features.meliae)
463
455
        refs = [k1, k2]
464
456
        if self.module is _static_tuple_py:
465
457
            refs.append(self.module.StaticTuple)
466
 
        def key(k):
467
 
            if isinstance(k, type):
468
 
                return (0, k)
469
 
            if isinstance(k, self.module.StaticTuple):
470
 
                return (1, k)
471
 
            raise TypeError(k)
472
 
 
473
 
        self.assertEqual(sorted(refs, key=key),
474
 
                         sorted(scanner.get_referents(k3), key=key))
 
458
        self.assertEqual(sorted(refs),
 
459
                         sorted(scanner.get_referents(k3)))
475
460
 
476
461
    def test_empty_is_singleton(self):
477
462
        key = self.module.StaticTuple()