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()]
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()]
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']
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")]