File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1010import os
1111import os .path as osp
1212from pathlib import Path
13+ import pickle
1314import re
1415import shutil
1516import subprocess
@@ -329,12 +330,20 @@ def test_persistent_cat_file_command(self):
329330 self .assertEqual (typename , typename_two )
330331 self .assertEqual (size , size_two )
331332
332- def test_version (self ):
333+ def test_version_info (self ):
334+ """The version_info attribute is a tuple of ints."""
333335 v = self .git .version_info
334336 self .assertIsInstance (v , tuple )
335337 for n in v :
336338 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 )
338347
339348 def test_git_exc_name_is_git (self ):
340349 self .assertEqual (self .git .git_exec_name , "git" )
You can’t perform that action at this time.
0 commit comments