/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_foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Tests for foreign VCS utility code."""
19
19
 
20
20
 
21
 
from breezy import (
 
21
from .. import (
22
22
    branch,
23
23
    bzrdir,
24
24
    controldir,
33
33
    vf_repository,
34
34
    )
35
35
 
36
 
from breezy.repofmt import groupcompress_repo
 
36
from ..repofmt import groupcompress_repo
37
37
 
38
38
# This is the dummy foreign revision control system, used 
39
39
# mainly here in the testsuite to test the foreign VCS infrastructure.
50
50
    """A simple mapping for the dummy Foreign VCS, for use with testing."""
51
51
 
52
52
    def __eq__(self, other):
53
 
        return type(self) == type(other)
 
53
        return isinstance(self, type(other))
54
54
 
55
55
    def revision_id_bzr_to_foreign(self, bzr_revid):
56
56
        return tuple(bzr_revid[len("dummy-v1:"):].split("-")), self
376
376
 
377
377
    @classmethod
378
378
    def known_formats(cls):
379
 
        return set([DummyForeignVcsDirFormat()])
 
379
        return {DummyForeignVcsDirFormat()}
380
380
 
381
381
 
382
382
class ForeignVcsRegistryTests(tests.TestCase):
432
432
        foreign.update_workingtree_fileids(wt, target_basis)
433
433
        wt.lock_read()
434
434
        try:
435
 
            self.assertEqual(set([root_id, "bla-b"]), set(wt.all_file_ids()))
 
435
            self.assertEqual({root_id, "bla-b"}, set(wt.all_file_ids()))
436
436
        finally:
437
437
            wt.unlock()
438
438