Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

        def clear_needed():
    needed = get_needed()
    needed.clear()
        


src/f/a/fanstatic-1.0a5/tests/test_core.py   fanstatic(Download)
import pytest
 
from fanstatic import (Library,
                       Resource,
                       NeededResources,
        dummy.clear()
    with pytest.raises(NotImplementedError):
        clear_needed()
 
    # Initialize a needed resources object.
        dummy.clear()
    with pytest.raises(NotImplementedError):
        clear_needed()
 
 
    # For some reason,for example an error page needs to be rendered,
    # the currently needed resources need to be cleared.
    clear_needed()
    assert len(needed.resources()) == 0
    z2.need()

src/f/a/fanstatic-tools-0.2/fanstatic/test_core.py   fanstatic-tools(Download)
import six
 
from fanstatic import (Library,
                       Resource,
                       NeededResources,
        dummy.clear()
    with pytest.raises(NotImplementedError):
        clear_needed()
 
    # Initialize a needed resources object.
        dummy.clear()
    with pytest.raises(NotImplementedError):
        clear_needed()
 
def test_convenience_need():
    # For some reason,for example an error page needs to be rendered,
    # the currently needed resources need to be cleared.
    clear_needed()
    assert needed.resources() == []
    z2.need()