File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,16 @@ def test_getinfo(self):
483483 # Check a number of standard namespaces
484484 # FS objects may not support all these, but we can at least
485485 # invoke the code
486- self .fs .getinfo ("foo" , namespaces = ["access" , "stat" , "details" ])
486+ info = self .fs .getinfo ("foo" , namespaces = ["access" , "stat" , "details" ])
487+
488+ # Check that if the details namespace is present, times are
489+ # of valid types.
490+ if 'details' in info .namespaces :
491+ details = info .raw ['details' ]
492+ self .assertIsInstance (details .get ('accessed' ), (type (None ), int , float ))
493+ self .assertIsInstance (details .get ('modified' ), (type (None ), int , float ))
494+ self .assertIsInstance (details .get ('created' ), (type (None ), int , float ))
495+ self .assertIsInstance (details .get ('metadata_changed' ), (type (None ), int , float ))
487496
488497 def test_exists (self ):
489498 # Test exists method.
You can’t perform that action at this time.
0 commit comments