Tuukka Mustonen

Results 64 comments of Tuukka Mustonen

I guess sequential definitions make sense, when you want to / want to re-use the inner types in multiple places. Like: ```py class Inner(TypedDict): ... class Outer1(TypedDict): field1: str inner:...

Try this: mkvirtualenv --no-site-packages sanetest pip install django djangosanetesting nose yolk yolk -l # to see the installed versions django-admin.py startproject sanetest cd sanetest/ nano settings.py # set database ENGINE...

Nose does find the tests inside tests.py. However, when overriding testcase selection by --with-sanetestselectionplugin, the test discovery gets broken. To me, it seems that the plugin breaks discovery, not nose....

Thanks for looking into it. However: > As said, to "fix" this bug, I'll probably introduce a plugin that will look for SaneTestCase subclasses as an alternative way to specify...

Sorry to constantly get back on this but I did try to select only unittests by providing `-u` option. Check the original report. Am I really missing something now?

Aah so nose doesn't find the test anymore because I changed it to inherit from something else than `unittest.TestaCase` (and also because the file is not in discovery path but...

True, didn't remember `@` is just syntactic sugar. It looks a bit ugly though? Although I guess some would say it looks "pythonic" instead. Native support would be better, or...

Ok so just extend `BaseHTTPMiddleware`, I see. Thanks for the pointers! So unless I'm mistaken there are at least 3 ways to specify ```py async def request_id(request: Request, call_next): ......

Yeah, like that. I like the "names" that you gave for the approaches. > putting side-effects in a class constructors sounds like it's going to cause all sorts of invisible...

I agree, it's not the perfect model (but it can be sufficient). Note it is suggested in Flask docs, see https://flask.palletsprojects.com/en/1.1.x/extensiondev/#the-extension-code: ```py class SQLite3: def __init__(self, app=None): self.app = app...