19 lines
544 B
Python
19 lines
544 B
Python
import unittest
|
|
from cyclic_contracts import Transporter
|
|
|
|
|
|
class CyclicTest(unittest.TestCase):
|
|
"""docstring for CyclicTest."""
|
|
|
|
def test_contract(self):
|
|
cc = Transporter.from_file("./contracts.txt").contract_corridors()
|
|
self.assertEqual(cc, [('Mumbai', 'Bangalore')])
|
|
|
|
def test_partial(self):
|
|
cc = Transporter.from_file(
|
|
"./contracts_partial.txt").contract_corridors()
|
|
self.assertEqual(cc, [('Mumbai', 'Kolkata'), ('Chennai', 'Kolkata')])
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|