Пример #1
0
class TestMultiContestWalker(PestoTestCase):
    def setUp(self):
        self.walker = MultipleContestWalker()

    def test_walk(self):
        contests_dir = os.path.join('testdata', 'ejudge_contest')
        contests = list(self.walker.walk(contests_dir))
        true_contests = [('1', os.path.join('testdata', 'ejudge_contest', '000001')),
                         ('2', os.path.join('testdata', 'ejudge_contest', '000002')),
                         ('5', os.path.join('testdata', 'ejudge_contest', '000005')),
                         ('3', os.path.join('testdata', 'ejudge_contest',
                                            'there_is_a_contest_inside', '000003'))]
        self.assertEqual(sorted(contests), sorted(true_contests))
Пример #2
0
 def setUp(self):
     self.walker = MultipleContestWalker()