
import unittest

class TestObvezna(unittest.TestCase):
    def test_prestej(self):
        self.assertEqual(prestej("0/103/93/599"), 12)
        self.assertEqual(prestej("0"), 1005)
        self.assertEqual(prestej("0/100/816"), 1)
        self.assertEqual(prestej("0/100"), 2)
        self.assertEqual(prestej("0/103"), 211)

    def test_koncni(self):
        self.assertEqual(koncni("0/103/93/599"), 6)
        self.assertEqual(koncni("0/100"), 1)
        self.assertEqual(koncni("0"), 495)

    def test_globina(self):
        self.assertEqual(globina("0/103/93/599"), 5)
        self.assertEqual(globina("0/100"), 2)
        self.assertEqual(globina("0"), 15)


class TestDodatna(unittest.TestCase):
    def test_naj_pot(self):
        self.assertEqual(naj_pot("0/103/93/599"), "0/103/93/599/847/647/722/803")
        self.assertEqual(naj_pot("0"), "0/976/891/966/558/910/286/669/755/690/692/618/141/496/936")
        self.assertEqual(naj_pot("0/976/891/966/558/910"), "0/976/891/966/558/910/286/669/755/690/692/618/141/496/936")
        self.assertEqual(naj_pot("0/100"), "0/100/816")

    def test_najvec_pod(self):
        self.assertEqual(najvec_pod("0"), "0")
        self.assertEqual(najvec_pod("0/103"), "0/103/441")

    def test_pot_do(self):
        self.assertEqual(pot_do("874", "0/103/93/599"), "0/103/93/599/84/838/874")
        self.assertEqual(pot_do("665", "0"), "0/278/665")
        self.assertEqual(pot_do("203", "0"), "0/976/891/966/558/203")

if __name__ == "__main__":
    unittest.main()
