Exemple #1
0
def test_bundle_ignores_not_dir(patch):
    patch.many(os.path, ['relpath', 'isdir'])
    os.path.isdir.return_value = False
    result = Bundle.ignores('path')
    os.path.relpath.assert_called_with('path')
    assert result == [os.path.relpath()]
Exemple #2
0
def test_bundle_ignores_not_dir(patch):
    patch.many(os.path, ["relpath", "isdir"])
    os.path.isdir.return_value = False
    result = Bundle.ignores("path")
    os.path.relpath.assert_called_with("path")
    assert result == [os.path.relpath()]
Exemple #3
0
def test_bundle_ignores(patch):
    patch.object(os.path, 'isdir')
    patch.object(os, 'walk', return_value=[('root', [], ['one.story', 'two'])])
    result = Bundle.ignores('path')
    os.walk.assert_called_with('path')
    assert result == ['root/one.story']
Exemple #4
0
def test_bundle_ignores(patch):
    patch.object(os.path, "isdir")
    patch.object(os, "walk", return_value=[("root", [], ["one.story", "two"])])
    result = Bundle.ignores("path")
    os.walk.assert_called_with("path")
    assert result == [os.path.join("root", "one.story")]