Modify ↓
#10520 closed enhancement (fixed)
[PATCH] Unit test trac.db.util.sql_escape_percent()
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.0 |
Component: | database backend | Version: | 0.13dev |
Severity: | minor | Keywords: | patch |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The file source:trunk/trac/db/tests/util.py is a little spartan, here's a shot at improving that.
Attachments (1)
Change History (5)
by , 13 years ago
Attachment: | test_trac.db.util.sql_escape_percent.patch added |
---|
comment:1 by , 13 years ago
Keywords: | patch added |
---|
comment:3 by , 12 years ago
Milestone: | next-stable-1.0.x → 1.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Patch committed in r11094.
It was not that important to have a doctest for this one (it would even have been overly verbose, given the number of tests you had).
So… Thanks!
comment:4 by , 12 years ago
Owner: | set to |
---|
Note:
See TracTickets
for help on using tickets.
Good idea! However, for the specifics of
sql_escape_percent
, I think a doctest could be more appropriate (as it'll also serve more directly as a kind of terse "documentation" for the function).i.e.
(or something like that, untested code)
Look at some other tests (e.g. source:/trunk/trac/tests/resource.py) to see how to add a
DocTestSuite
.