File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 10
10
import os
11
11
import os .path as osp
12
12
from pathlib import Path
13
+ import pickle
13
14
import re
14
15
import shutil
15
16
import subprocess
@@ -329,12 +330,20 @@ def test_persistent_cat_file_command(self):
329
330
self .assertEqual (typename , typename_two )
330
331
self .assertEqual (size , size_two )
331
332
332
- def test_version (self ):
333
+ def test_version_info (self ):
334
+ """The version_info attribute is a tuple of ints."""
333
335
v = self .git .version_info
334
336
self .assertIsInstance (v , tuple )
335
337
for n in v :
336
338
self .assertIsInstance (n , int )
337
- # END verify number types
339
+
340
+ def test_version_info_pickleable (self ):
341
+ """The version_info attribute is usable on unpickled Git instances."""
342
+ deserialized = pickle .loads (pickle .dumps (self .git ))
343
+ v = deserialized .version_info
344
+ self .assertIsInstance (v , tuple )
345
+ for n in v :
346
+ self .assertIsInstance (n , int )
338
347
339
348
def test_git_exc_name_is_git (self ):
340
349
self .assertEqual (self .git .git_exec_name , "git" )
You can’t perform that action at this time.
0 commit comments