Changeset - 529917d31320
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2019-11-23 21:36:07
mads@kiilerich.com
Grafted from: 90f76d13d5b0
tests: fix some odd source formatting / spacing around ','

From 2to3 -f ws_comma.
1 file changed with 12 insertions and 12 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/vcs/test_hg.py
Show inline comments
 
@@ -423,62 +423,62 @@ class TestMercurialChangeset(object):
 

	
 
        for fname, revision_dict in files.items():
 
            for rev, data in revision_dict.items():
 
                cs = self.repo.get_changeset(rev)
 
                l1_1 = [x[1] for x in cs.get_file_annotate(fname)]
 
                l1_2 = [x[2]().raw_id for x in cs.get_file_annotate(fname)]
 
                assert l1_1 == l1_2
 
                l1 = l1_2 = [x[2]().revision for x in cs.get_file_annotate(fname)]
 
                l2 = files[fname][rev]['changesets']
 
                assert l1 == l2, "The lists of revision for %s@rev%s" \
 
                    "from annotation list should match each other," \
 
                    "got \n%s \nvs \n%s " % (fname, rev, l1, l2)
 

	
 
    def test_changeset_state(self):
 
        """
 
        Tests which files have been added/changed/removed at particular revision
 
        """
 

	
 
        # rev 46ad32a4f974:
 
        # hg st --rev 46ad32a4f974
 
        #    changed: 13
 
        #    added:   20
 
        #    removed: 1
 
        changed = set(['.hgignore'
 
            , 'README.rst' , 'docs/conf.py' , 'docs/index.rst' , 'setup.py'
 
            , 'tests/test_hg.py' , 'tests/test_nodes.py' , 'vcs/__init__.py'
 
            , 'vcs/backends/__init__.py' , 'vcs/backends/base.py'
 
            , 'vcs/backends/hg.py' , 'vcs/nodes.py' , 'vcs/utils/__init__.py'])
 
            , 'README.rst', 'docs/conf.py', 'docs/index.rst', 'setup.py'
 
            , 'tests/test_hg.py', 'tests/test_nodes.py', 'vcs/__init__.py'
 
            , 'vcs/backends/__init__.py', 'vcs/backends/base.py'
 
            , 'vcs/backends/hg.py', 'vcs/nodes.py', 'vcs/utils/__init__.py'])
 

	
 
        added = set(['docs/api/backends/hg.rst'
 
            , 'docs/api/backends/index.rst' , 'docs/api/index.rst'
 
            , 'docs/api/nodes.rst' , 'docs/api/web/index.rst'
 
            , 'docs/api/web/simplevcs.rst' , 'docs/installation.rst'
 
            , 'docs/quickstart.rst' , 'setup.cfg' , 'vcs/utils/baseui_config.py'
 
            , 'vcs/utils/web.py' , 'vcs/web/__init__.py' , 'vcs/web/exceptions.py'
 
            , 'vcs/web/simplevcs/__init__.py' , 'vcs/web/simplevcs/exceptions.py'
 
            , 'vcs/web/simplevcs/middleware.py' , 'vcs/web/simplevcs/models.py'
 
            , 'vcs/web/simplevcs/settings.py' , 'vcs/web/simplevcs/utils.py'
 
            , 'docs/api/backends/index.rst', 'docs/api/index.rst'
 
            , 'docs/api/nodes.rst', 'docs/api/web/index.rst'
 
            , 'docs/api/web/simplevcs.rst', 'docs/installation.rst'
 
            , 'docs/quickstart.rst', 'setup.cfg', 'vcs/utils/baseui_config.py'
 
            , 'vcs/utils/web.py', 'vcs/web/__init__.py', 'vcs/web/exceptions.py'
 
            , 'vcs/web/simplevcs/__init__.py', 'vcs/web/simplevcs/exceptions.py'
 
            , 'vcs/web/simplevcs/middleware.py', 'vcs/web/simplevcs/models.py'
 
            , 'vcs/web/simplevcs/settings.py', 'vcs/web/simplevcs/utils.py'
 
            , 'vcs/web/simplevcs/views.py'])
 

	
 
        removed = set(['docs/api.rst'])
 

	
 
        chset64 = self.repo.get_changeset('46ad32a4f974')
 
        assert set((node.path for node in chset64.added)) == added
 
        assert set((node.path for node in chset64.changed)) == changed
 
        assert set((node.path for node in chset64.removed)) == removed
 

	
 
        # rev b090f22d27d6:
 
        # hg st --rev b090f22d27d6
 
        #    changed: 13
 
        #    added:   20
 
        #    removed: 1
 
        chset88 = self.repo.get_changeset('b090f22d27d6')
 
        assert set((node.path for node in chset88.added)) == set()
 
        assert set((node.path for node in chset88.changed)) == set(['.hgignore'])
 
        assert set((node.path for node in chset88.removed)) == set()
 

	
 
        # 85:
 
        #    added:   2 ['vcs/utils/diffs.py', 'vcs/web/simplevcs/views/diffs.py']
 
        #    changed: 4 ['vcs/web/simplevcs/models.py', ...]
 
        #    removed: 1 ['vcs/utils/web.py']
 
        chset85 = self.repo.get_changeset(85)
0 comments (0 inline, 0 general)