# HG changeset patch # User Jeff Hammel # Date 1330984147 28800 # Node ID f00fcf6d9f1d3b576cb7e80ca28c600e2e70cd35 # Parent 52103702a7321bc702f1d04853dfe5680ec713ac test not modified response diff -r 52103702a732 -r f00fcf6d9f1d tests/test.py --- a/tests/test.py Mon Mar 05 13:40:15 2012 -0800 +++ b/tests/test.py Mon Mar 05 13:49:07 2012 -0800 @@ -17,9 +17,10 @@ # doctest arguments directory = os.path.dirname(os.path.abspath(__file__)) extraglobs = {'here': directory} - doctest_args = dict(extraglobs=extraglobs, raise_on_error=raise_on_error) + doctest_args = dict(extraglobs=extraglobs, raise_on_error=raise_on_error, ) + doctest_args['optionflags'] = doctest.ELLIPSIS if report_first: - doctest_args['optionflags'] = doctest.REPORT_ONLY_FIRST_FAILURE + doctest_args['optionflags'] |= doctest.REPORT_ONLY_FIRST_FAILURE # gather tests tests = [test for test in os.listdir(directory) diff -r 52103702a732 -r f00fcf6d9f1d tests/test_fileapp.txt --- a/tests/test_fileapp.txt Mon Mar 05 13:40:15 2012 -0800 +++ b/tests/test_fileapp.txt Mon Mar 05 13:49:07 2012 -0800 @@ -29,7 +29,7 @@ 6L >>> req = Request.blank('/') >>> res = req.get_response(app) - >>> print res # doctest:+ELLIPSIS + >>> print res 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 6 @@ -38,3 +38,11 @@ hello + >>> req2 = Request.blank('/') + >>> req2.if_none_match = res.etag + >>> req2.get_response(app) + + >>> req3 = Request.blank('/') + >>> req3.if_modified_since = res.last_modified + >>> req3.get_response(app) +