def test_to_relative_path_with_super_at_root_drive(self):
     class Repo(object):
         working_tree_dir = 'D:\\'
     super_repo = Repo()
     submodule_path = 'D:\\submodule_path'
     relative_path = Submodule._to_relative_path(super_repo, submodule_path)
     msg = '_to_relative_path should be "submodule_path" but was "%s"' % relative_path
     assert relative_path == 'submodule_path', msg
Example #2
0
    def test_to_relative_path_with_super_at_root_drive(self):
        class Repo(object):
            working_tree_dir = 'D:\\'

        super_repo = Repo()
        submodule_path = 'D:\\submodule_path'
        relative_path = Submodule._to_relative_path(super_repo, submodule_path)
        msg = '_to_relative_path should be "submodule_path" but was "%s"' % relative_path
        assert relative_path == 'submodule_path', msg