7
7
import os
8
8
9
9
from 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
11
11
12
12
13
13
class Tutorials (TestBase ):
14
14
15
+ @skip_on_travis_ci
15
16
@with_rw_directory
16
17
def test_init_repo_object (self , rw_dir ):
17
18
# [1-test_init_repo_object]
@@ -165,7 +166,7 @@ def update(self, op_code, cur_count, max_count=None, message=''):
165
166
for sm in cloned_repo .submodules :
166
167
assert not sm .remove ().exists () # after removal, the sm doesn't exist anymore
167
168
sm = cloned_repo .create_submodule ('mysubrepo' , 'path/to/subrepo' , url = bare_repo .git_dir , branch = 'master' )
168
-
169
+
169
170
# .gitmodules was written and added to the index, which is now being committed
170
171
cloned_repo .index .commit ("Added submodule" )
171
172
assert sm .exists () and sm .module_exists () # this submodule is defintely available
@@ -395,7 +396,7 @@ def test_references_and_objects(self, rw_dir):
395
396
hcommit .diff () # diff tree against index
396
397
hcommit .diff ('HEAD~1' ) # diff tree against previous tree
397
398
hcommit .diff (None ) # diff tree against working tree
398
-
399
+
399
400
index = repo .index
400
401
index .diff () # diff index against itself yielding empty diff
401
402
index .diff (None ) # diff index against working copy
@@ -446,7 +447,7 @@ def test_submodules(self):
446
447
sm = sms [0 ]
447
448
assert sm .name == 'gitdb' # git-python has gitdb as single submodule ...
448
449
assert sm .children ()[0 ].name == 'smmap' # ... which has smmap as single submodule
449
-
450
+
450
451
# The module is the repository referenced by the submodule
451
452
assert sm .module_exists () # the module is available, which doesn't have to be the case.
452
453
assert sm .module ().working_tree_dir .endswith ('gitdb' )
@@ -458,7 +459,7 @@ def test_submodules(self):
458
459
assert sm .config_reader ().get_value ('path' ) == sm .path
459
460
assert len (sm .children ()) == 1 # query the submodule hierarchy
460
461
# ![1-test_submodules]
461
-
462
+
462
463
@with_rw_directory
463
464
def test_add_file_and_commit (self , rw_dir ):
464
465
import git
0 commit comments