[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: Re: [Python-Dev] Tests for internal functionality
From: Nick Coghlan <ncoghlan () gmail ! com>
Date: 2019-03-30 15:08:11
Message-ID: CADiSq7cJxEA52yp_HE4baGTUCL5JLUyiLCpLGb-A6A=mxwiDFw () mail ! gmail ! com
[Download RAW message or body]
On Sun, 17 Mar 2019 at 07:27, Terry Reedy <tjreedy@udel.edu> wrote:
>
> On 3/16/2019 3:10 AM, Ivan Pozdeev via Python-Dev wrote:
> > In https://github.com/python/cpython/pull/6541 , I was requested to add
> > tests for an internal C function.
> >
> > As I wrote in
> > https://github.com/python/cpython/pull/6541#issuecomment-445514807 ,
> > it's not clear from the codebase
> >
> > 1) where tests for internal (as opposed to public) functionality should
> > be located
>
> In the same file where they would be if public, which is what you seemed
> to find. Label somehow, such as 'class InternalsTest(TestCase):' or
> 'test__private' (with double __ indicating test of _private).
A belated follow-up here: in most cases, such tests should be marked
with https://docs.python.org/3/library/test.html#test.support.cpython_only,
so they get skipped automatically when the test suite is run against
another implementation.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-dev-marcsub-zyf4%40marc.info
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic