>So maybe what we should do now, rather than add one feature, is propose a  new 
>test framework/test runner for the stdlib, inspired by pytest.

I'd actually avoid reinventing a test framework as I think this has proven to 
be futile. I'm of the opinion that the language should provide a lean infra for 
useful testing and have libraries take it from there.

I don't think this is exclusively testing related, as it can be useful as a 
debugging mechanism for things that shouldn't happen, but happen in production.

>Alternatively, take the approach taken with distutils and setuptools— 
>officially accept that a full featured test framework will be left to third 
>parties.

I'm not sure I'm familiar with this. Can you please elaborate?

>NOTE: if the proposal does require actual language changes beyond the current 
>introspection options, that should be made clear.

Note taken. I'm not very familiar with the internals, so I hesitated to write 
this in the PEP, but from what I understand we can make a language change that 
will take care of the AST side of things so that 3rd party libraries can focus 
on the rendering. This way the 3rd party libraries don't have to act as 
executors. Does that make sense?

On Sat, Sep 25, 2021, at 05:45, Christopher Barker wrote:
> My first thought when reading this (and the recent discussion on Python 
> ideas) was that pytest already does this. 
> 
> Then I see in the PEP:   "What pytest does is awesome“
> 
> So what? 
> 
> Well,  two points:
> 
> 1) this should be part of a test framework, not something built in to 
> exceptions. Pytest has shown that it can be done without any language 
> changes. 
> 
> 2) there are a lot of things in Pytest that are very useful. And a lot of 
> problems with unittest. 
> 
> So maybe what we should do now, rather than add one feature, is propose a  
> new test framework/test runner for the stdlib, inspired by pytest. 
> 
> Alternatively, take the approach taken with distutils and setuptools— 
> officially accept that a full featured test framework will be left to third 
> parties.
> 
> NOTE: if the proposal does require actual language changes beyond the current 
>  introspection options, that should be made clear.
> 
> -CHB 
> 
> 
> On Fri, Sep 24, 2021 at 4:12 AM Paul Moore <p.f.mo...@gmail.com> wrote:
>> On Fri, 24 Sept 2021 at 12:05, Noam Tenne <n...@10ne.org> wrote:
>> 
>> > Caveats
>> > -------
>> >
>> > It is important to note that expressions with side effects are affected by 
>> > this feature. This is because in order to display this information, we 
>> > must store references to the instances and not just the values.
>> 
>> One immediate thought. You should give examples of the sort of
>> expressions that are affected, and precisely what the effect is. It's
>> impossible to judge the importance of this point without details.
>> 
>> Paul
>> _______________________________________________
>> Python-ideas mailing list -- python-ideas@python.org
>> To unsubscribe send an email to python-ideas-le...@python.org
>> https://mail.python.org/mailman3/lists/python-ideas.python.org/
>> Message archived at 
>> https://mail.python.org/archives/list/python-ideas@python.org/message/JJ2CT4FYFHJOOSABQOD6KRKCQ22FJ2BI/
>> Code of Conduct: http://python.org/psf/codeofconduct/
> -- 
> Christopher Barker, PhD (Chris)
> 
> Python Language Consulting
>   - Teaching
>   - Scientific Software Development
>   - Desktop GUI and Web Development
>   - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/7VZLMHZPJCV35UWZRQMKU74DQHFUH7OA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to