Changeset 741:fdb907248de0 in hatta-dev


Ignore:
Timestamp:
01/24/10 13:33:27 (2 years ago)
Author:
sheep@…
Branch:
default
Message:

add example test for the subdirectory storage, mark tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test_repo.py

    r740 r741  
    6464    """ 
    6565 
     66    author = u'test author' 
     67    text = u'test text' 
     68    comment = u'test comment' 
     69 
     70    @py.test.mark.xfail 
     71    def test_filename(self, repo): 
     72        """ 
     73        Check if the page's file is named properly. 
     74        """ 
     75 
     76        title = u'some/page.txt' 
     77        filename = 'some/page.txt' 
     78        filepath = os.path.join(repo.path, filename) 
     79        repo.save_text(title, self.text, self.author, self.comment, parent=-1) 
     80        exists = os.path.exists(filepath) 
     81        assert exists 
     82 
    6683    # XXX Put your tests here. 
    67  
    6884 
    6985class TestMercurialStorage(object): 
     
    87103        filepath = os.path.join(repo.path, filename) 
    88104        repo.save_text(title, self.text, self.author, self.comment, parent=-1) 
    89         assert os.path.exists(filepath) 
    90  
     105        exists = os.path.exists(filepath) 
     106        assert exists 
     107 
     108    @py.test.mark.skipif("sys.platform == 'win32'") 
    91109    def test_symlinks(self, repo): 
    92110        """ 
     
    102120                       self.title) 
    103121 
     122    @py.test.mark.skipif("sys.platform == 'win32'") 
    104123    def test_symlinks_not_exist(self, repo): 
    105124        """ 
     
    151170                       self.title, self.author, self.comment) 
    152171 
     172    @py.test.mark.skipif("sys.platform == 'win32'") 
    153173    def test_symlink_delete(self, repo): 
    154174        """ 
Note: See TracChangeset for help on using the changeset viewer.