doctest
Does Python doctest remove the need for unit-tests?
A fellow developer on a project I am on believes that doctests are as good as unit-tests, and that if a piece of code is doctested, it does not need to be unit-tested. I do not believe this to be the[详细]
2022-12-26 17:26 分类:问答Maximum packet size for a TCP connection
What is the maximum packet size for a TCP connection or how can I get the maximum packe开发者_JAVA技巧t size?The absolute limitation on TCP packet size is 64K (65535 bytes), but in practicality this i[详细]
2022-12-26 15:05 分类:问答Handling import errors when using doctest
every now and then when I code in Python, I have to do without certain third-party modules. Eg. when I\'m writing user authentication, it can be done in several ways and one of them is by using LDAP[详细]
2022-12-26 00:52 分类:问答Mocking ImportError in Python
I\'m trying this for almost two hours now, without any luck. I have a module that looks like this: try:[详细]
2022-12-23 06:56 分类:问答Testing warnings with doctest
I\'d like to use doctests to test the presence of certain warnings.For example, suppose I have the following module:[详细]
2022-12-22 07:36 分类:问答How can I exclude elements with xsi:nil="true" from a transformation?
I\'ve got some XML files that recently changed so that some of the nodes now have the attribute xsi:nil=\"true\".I\'ve got an XSLT style sheet that renders the XML into HTML for some quick eyeballing[详细]
2022-12-18 23:57 分类:问答Examples of using Doctests in Django in an Agile / BDD way
I\'m interested in learning how to Doctests and Unit tests in a more Agile / BDD way. I\'ve found a few tutorials that seem reasonable, but they are just thumbnails.[详细]
2022-12-14 14:19 分类:问答How do I include unicode strings in Python doctests?
I am working on some code that has to manipulate unicode strings. I am trying to write doctests for it, but am having trouble. The following is a minimal example that illustrates the problem:[详细]
2022-12-11 05:02 分类:问答Is it possible to run a single doctest in Django using "manage.py test"
In my Django app, I have a mix of doctests (defined in models.py and views.py) and unit tests (defined in tests.py.I can invoke an individual unit test by doing:[详细]
2022-12-10 19:12 分类:问答Configure Django to find all doctests in all modules?
If I run the following command: >python manage.py test Django looks at tests.py in my application, and runs any doctests or unit tests in that file. It also looks at the __ test __ dictionary fo[详细]
2022-12-09 02:15 分类:问答
加载中,请稍侯......