

def test_canonical_filename(self):
    testdata = [{
        'input': 'recipes',
        'expected': 'recipes/index.html',
    }, {
        'input': '/recipes/',
        'expected': 'recipes/index.html',
    }, {
        'input': '/recipes',
        'expected': 'recipes/index.html',
    }, {
        'input': '/recipes/veggy',
        'expected': 'recipes/veggy/index.html',
    }, {
        'input': '/recipes/veggy/index.html',
        'expected': 'recipes/veggy/index.html',
    }, {
        'input': '/recipes/veggy.html',
        'expected': 'recipes/veggy.html',
    }]
    for paths in testdata:
        self.assertEqual(path.canonical_filename(self['input']), paths['expected'])

dataset/ETHPy150Open yaph/logya/tests/test_path.py TestPath.test_canonical_filename/VarMisuse@113/225 `paths`->`self`