1010class TestTree (object ):
1111 def setup (self ):
1212 self .repo = Repo (GIT_REPO )
13- self .tree = Tree (self .repo )
1413
1514 @patch (Git , '_call_process' )
1615 def test_contents_should_cache (self , git ):
@@ -28,7 +27,7 @@ def test_contents_should_cache(self, git):
2827
2928 def test_content_from_string_tree_should_return_tree (self ):
3029 text = fixture ('ls_tree_a' ).splitlines ()[- 1 ]
31- tree = self . tree .content_from_string (None , text )
30+ tree = Tree .content_from_string (None , text )
3231
3332 assert_equal (Tree , tree .__class__ )
3433 assert_equal ("650fa3f0c17f1edb4ae53d8dcca4ac59d86e6c44" , tree .id )
@@ -38,7 +37,7 @@ def test_content_from_string_tree_should_return_tree(self):
3837 def test_content_from_string_tree_should_return_blob (self ):
3938 text = fixture ('ls_tree_b' ).split ("\n " )[0 ]
4039
41- tree = self . tree .content_from_string (None , text )
40+ tree = Tree .content_from_string (None , text )
4241
4342 assert_equal (Blob , tree .__class__ )
4443 assert_equal ("aa94e396335d2957ca92606f909e53e7beaf3fbb" , tree .id )
@@ -48,12 +47,12 @@ def test_content_from_string_tree_should_return_blob(self):
4847 def test_content_from_string_tree_should_return_commit (self ):
4948 text = fixture ('ls_tree_commit' ).split ("\n " )[1 ]
5049
51- tree = self . tree .content_from_string (None , text )
50+ tree = Tree .content_from_string (None , text )
5251 assert_none (tree )
5352
5453 @raises (TypeError )
5554 def test_content_from_string_invalid_type_should_raise (self ):
56- self . tree .content_from_string (None , "040000 bogus 650fa3f0c17f1edb4ae53d8dcca4ac59d86e6c44 test" )
55+ Tree .content_from_string (None , "040000 bogus 650fa3f0c17f1edb4ae53d8dcca4ac59d86e6c44 test" )
5756
5857 @patch (Blob , 'size' )
5958 @patch (Git , '_call_process' )
@@ -146,5 +145,5 @@ def test_dict_with_non_existant_file(self, git):
146145 tree ['bar' ]
147146
148147 def test_repr (self ):
149- self . tree = Tree (self .repo , ** { 'id' : ' abc'} )
150- assert_equal ('<GitPython.Tree "abc">' , repr (self . tree ))
148+ tree = Tree (self .repo , id = ' abc' )
149+ assert_equal ('<GitPython.Tree "abc">' , repr (tree ))
0 commit comments