コード例 #1
0
ファイル: resources.py プロジェクト: AshishNamdev/pootle
def test_fs_state_resources(project0_fs_resources):
    project = project0_fs_resources
    plugin = DummyPlugin(project)
    state_resources = FSProjectStateResources(plugin)
    assert state_resources.resources is plugin.resources
    # resources are cached on state and plugin
    plugin.reload()
    assert state_resources.resources is not plugin.resources
    state_resources.reload()
    assert state_resources.resources is plugin.resources
コード例 #2
0
ファイル: resources.py プロジェクト: r-o-b-b-i-e/pootle
def test_fs_state_resources(project0_fs_resources):
    project = project0_fs_resources
    plugin = DummyPlugin(project)
    state_resources = FSProjectStateResources(plugin)
    assert state_resources.resources is plugin.resources
    # resources are cached on state and plugin
    plugin.reload()
    assert state_resources.resources is not plugin.resources
    state_resources.reload()
    assert state_resources.resources is plugin.resources