77import os
88
99from git .test .lib import TestBase
10- from gitdb .test .lib import with_rw_directory
10+ from gitdb .test .lib import skip_on_travis_ci , with_rw_directory
1111
1212
1313class Tutorials (TestBase ):
1414
15+ @skip_on_travis_ci
1516@with_rw_directory
1617def test_init_repo_object (self ,rw_dir ):
1718# [1-test_init_repo_object]
@@ -165,7 +166,7 @@ def update(self, op_code, cur_count, max_count=None, message=''):
165166for sm in cloned_repo .submodules :
166167assert not sm .remove ().exists ()# after removal, the sm doesn't exist anymore
167168sm = cloned_repo .create_submodule ('mysubrepo' ,'path/to/subrepo' ,url = bare_repo .git_dir ,branch = 'master' )
168-
169+
169170# .gitmodules was written and added to the index, which is now being committed
170171cloned_repo .index .commit ("Added submodule" )
171172assert sm .exists ()and sm .module_exists ()# this submodule is defintely available
@@ -395,7 +396,7 @@ def test_references_and_objects(self, rw_dir):
395396hcommit .diff ()# diff tree against index
396397hcommit .diff ('HEAD~1' )# diff tree against previous tree
397398hcommit .diff (None )# diff tree against working tree
398-
399+
399400index = repo .index
400401index .diff ()# diff index against itself yielding empty diff
401402index .diff (None )# diff index against working copy
@@ -446,7 +447,7 @@ def test_submodules(self):
446447sm = sms [0 ]
447448assert sm .name == 'gitdb' # git-python has gitdb as single submodule ...
448449assert sm .children ()[0 ].name == 'smmap' # ... which has smmap as single submodule
449-
450+
450451# The module is the repository referenced by the submodule
451452assert sm .module_exists ()# the module is available, which doesn't have to be the case.
452453assert sm .module ().working_tree_dir .endswith ('gitdb' )
@@ -458,7 +459,7 @@ def test_submodules(self):
458459assert sm .config_reader ().get_value ('path' )== sm .path
459460assert len (sm .children ())== 1 # query the submodule hierarchy
460461# ![1-test_submodules]
461-
462+
462463@with_rw_directory
463464def test_add_file_and_commit (self ,rw_dir ):
464465import git