Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/d/j/django-prefetch-HEAD/tests/test_app/tests.py   django-prefetch(Download)
import re
 
from .models import Book, Author, Tag, BookNote, SillyException, LatestBook
from prefetch import InvalidPrefetch, Prefetcher, P, PrefetchManager
 
    def test_wrong_prefetch_subclass_and_instance(self):
        with self.assertRaises(InvalidPrefetch) as cm:
                objects = PrefetchManager(
                    latest_book_as_instance = LatestBook(),
                )

src/d/j/django-prefetch-0.2/tests/test_app/tests.py   django-prefetch(Download)
import re
 
from .models import Book, Author, Tag, BookNote, SillyException, LatestBook
from prefetch import InvalidPrefetch, Prefetcher, P, PrefetchManager
 
    def test_wrong_prefetch_subclass_and_instance(self):
        with self.assertRaises(InvalidPrefetch) as cm:
                objects = PrefetchManager(
                    latest_book_as_instance = LatestBook(),
                )