view tests/test-forget.py @ 67:730c42743ba3

tests: cleanup on test finish so Windows doesn't complain about used files - chdir out of the test dir before rmtree - cache instances of hgclient and close them explicitly on tearDown before rmtree
author Idan Kamara <idankk86@gmail.com>
date Mon, 05 Sep 2011 20:51:29 +0300
parents ee8863882aae
children 4359cabcb0cc
line wrap: on
line source

import common

class test_forget(common.basetest):
    def test_basic(self):
        self.append('a', 'a')
        self.client.add(['a'])
        self.assertTrue(self.client.forget('a'))

    def test_warnings(self):
        self.assertFalse(self.client.forget('a'))
        self.append('a', 'a')
        self.client.add(['a'])
        self.assertFalse(self.client.forget(['a', 'b']))