mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-14 07:18:27 +01:00
Test acceptable path types of get_mtime_and_size
This commit is contained in:
@@ -39,6 +39,15 @@ class TestMtimeAndSize(TestDir):
|
||||
self.assertIs(type(dir_size), str)
|
||||
self.assertEqual(dir_size, str(actual_dir_size))
|
||||
|
||||
def test_path_object_and_str_are_valid_types(self):
|
||||
dvcignore = DvcIgnoreFilter(self.root_dir)
|
||||
file_time, file_size = get_mtime_and_size(self.DATA, dvcignore)
|
||||
file_object_time, file_object_size = get_mtime_and_size(
|
||||
PathInfo(self.DATA), dvcignore
|
||||
)
|
||||
self.assertEqual(file_time, file_object_time)
|
||||
self.assertEqual(file_size, file_object_size)
|
||||
|
||||
|
||||
class TestContainsLink(TestCase):
|
||||
def test_should_raise_exception_on_base_path_not_in_path(self):
|
||||
|
||||
Reference in New Issue
Block a user