This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients gpolo, kbk, loewis, roger.serwy, serhiy.storchaka, terry.reedy
Date 2014-02-03.10:08:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391422108.91.0.470071837677.issue20368@psf.upfronthosting.co.za>
In-reply-to
Content
> But, how many of the replacement sites are exercised by the tests?

I added tests for most the replacement sites and updated tests has even more tests.

split() and splitlist() -- tested. Unfortunately they are tested only for bytes argument because these methods reject unicode string argument with NUL.

Tcl_Obj.string, Tcl_Obj.typename and Tcl_Obj.__str__() -- not tested. There are no explicit tests for these properties and methods. Seems as Tcl_Obj.typename can't be tested for NUL.

eval(), evalfile() -- tested.

Variable's methods -- tested.

exprstring() -- tested. I added tests for exprstring(), exprdouble(), exprlong(), exprboolean() in the patch.

record() -- not tested. There are no explicit tests for record() and I have no ideas how it can be used in Python.

C functions:

FromObj() and Tkapp_CallResult() -- implicitly tested in a lot of tests, in particular in test_passing_values and test_user_command.

PythonCmd() -- tested in test_user_command.


> There are a few changes that seem unrelated to nulls, which might have been left for another patch.

They are just make code more robust. For example Tcl can be compiled with TCL_UTF_MAX=6. In this case Python will work correctly most time but can work incorrectly or crash on specific rare data. With proposed changes it will raise SystemError early. Yes, it is worth separate issue.

> Do you know if this code block is tested.

It is implicitly tested in many tests which tests non-ASCII strings.
History
Date User Action Args
2014-02-03 10:08:29serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, terry.reedy, kbk, gpolo, roger.serwy
2014-02-03 10:08:28serhiy.storchakasetmessageid: <1391422108.91.0.470071837677.issue20368@psf.upfronthosting.co.za>
2014-02-03 10:08:28serhiy.storchakalinkissue20368 messages
2014-02-03 10:08:26serhiy.storchakacreate