tests/test_bookmark.py @ e2d60e4e3caf
Fix error: don't assume status is a tuple
This fix also works with older versions of Mercurial. `repo.status()` used to
return a named tuple; since 5.2.1 it returns an object. So `st[:5]` no longer
works, but `st.modified` works with both old and new versions of Mercurial.
author |
Sietse Brouwer <sbbrouwer@gmail.com> |
date |
Tue, 26 May 2020 14:57:58 +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 == ''