Esempio n. 1
0
 def test_root(self):
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW") == ParsedUrl(
             "[email protected]:StairwayToHeaven/HW.git", "master", "")
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW.git") == ParsedUrl(
             "[email protected]:StairwayToHeaven/HW.git", "master", "")
Esempio n. 2
0
 def test_raw(self):
     assert parse_url(
         "https://raw.githubusercontent.com/zuevmaxim/repo/yat/folder.py"
     ) == ParsedUrl("[email protected]:zuevmaxim/repo.git", "yat", "folder.py")
     assert parse_url(
         "https://raw.githubusercontent.com/tiginamaria/First/master/HW5/folder.py"
     ) == ParsedUrl("[email protected]:tiginamaria/First.git", "master",
                    "HW5/folder.py")
Esempio n. 3
0
 def test_file(self):
     assert parse_url("https://github.com/zuevmaxim/repo/blob/yat/folder.py"
                      ) == ParsedUrl("[email protected]:zuevmaxim/repo.git",
                                     "yat", "folder.py")
     assert parse_url(
         "https://github.com/tiginamaria/First/blob/master/HW5/folder.py"
     ) == ParsedUrl("[email protected]:tiginamaria/First.git", "master",
                    "HW5/folder.py")
Esempio n. 4
0
 def test_rase(self):
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW/raw/master/4/model.py"
     ) == ParsedUrl("[email protected]:StairwayToHeaven/HW.git", "master",
                    "4/model.py")
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW/raw/branch/4/model.py"
     ) == ParsedUrl("[email protected]:StairwayToHeaven/HW.git", "branch",
                    "4/model.py")
Esempio n. 5
0
 def test_subdir(self):
     assert parse_url(
         "https://github.com/zuevmaxim/repo/tree/yat") == ParsedUrl(
             "[email protected]:zuevmaxim/repo.git", "yat", "")
     assert parse_url("https://github.com/tiginamaria/First/tree/master/HW5"
                      ) == ParsedUrl("[email protected]:tiginamaria/First.git",
                                     "master", "HW5")
     assert parse_url(
         "https://github.com/tiginamaria/First/tree/master/HW5/yat"
     ) == ParsedUrl("[email protected]:tiginamaria/First.git", "master",
                    "HW5/yat")
Esempio n. 6
0
 def test_subdir(self):
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW/tree/master") == ParsedUrl(
             "[email protected]:StairwayToHeaven/HW.git", "master", "")
     assert parse_url("https://gitlab.com/StairwayToHeaven/HW/tree/master/5"
                      ) == ParsedUrl(
                          "[email protected]:StairwayToHeaven/HW.git",
                          "master", "5")
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW/tree/master/5/yat"
     ) == ParsedUrl("[email protected]:StairwayToHeaven/HW.git", "master",
                    "5/yat")
     assert parse_url(
         "https://gitlab.com/StairwayToHeaven/HW/tree/branch/5/yat"
     ) == ParsedUrl("[email protected]:StairwayToHeaven/HW.git", "branch",
                    "5/yat")
Esempio n. 7
0
 def test_root(self):
     assert parse_url("https://github.com/zuevmaxim/repo") == ParsedUrl(
         "[email protected]:zuevmaxim/repo.git", "master", "")
     assert parse_url("https://github.com/zuevmaxim/repo.git") == ParsedUrl(
         "[email protected]:zuevmaxim/repo.git", "master", "")