tests/test_bookmark.py @ cc789a5baf4a

Fix error with tags

Tags are defined on a commit, such as the current commit `repo['.']`.
They are not defined on the working directory, which `repo[None]` gives.
author Sietse Brouwer <sbbrouwer@gmail.com>
date Tue, 26 May 2020 15:08:02 +0200
parents 869146b8b9fb
children (none)
'''Test output of {bookmark}.'''

from nose import *
from util import *

@with_setup(setup_sandbox, teardown_sandbox)
def test_bookmark():
    hg_bookmark('test')

    output = prompt(fs='{bookmark}')
    assert output == 'test'

@with_setup(setup_sandbox, teardown_sandbox)
def test_no_bookmark():
    hg_bookmark('test')
    hg_deactivate_bookmark()

    output = prompt(fs='{bookmark}')
    assert output == ''