Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork948
Commit9fa1cee
committed
Extract a _assert_logged_for_popen method
This extracts the logic of searching log messages, and assertingthat (at least) one matches a pattern for the report of a Popencall with a given argument, from test_it_logs_if_it_uses_a_shellinto a new nonpublic test helper method _assert_logged_for_popen.The extracted version is modified to make it slightly more general,and slightly more robust. This is still not extremely robust: thenotation used to log Popen calls is informal, so it wouldn't makesense to really parse it as code. But this no longer assumes thatthe representation of a value ends at a word boundary, nor that thevalue is free of regular expression metacharacters.1 parenta8a43fe commit9fa1cee
1 file changed
+8
-6
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
43 | 50 |
| |
44 | 51 |
| |
45 | 52 |
| |
| |||
113 | 120 |
| |
114 | 121 |
| |
115 | 122 |
| |
116 |
| - | |
117 | 123 |
| |
118 | 124 |
| |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
| 125 | + | |
124 | 126 |
| |
125 | 127 |
| |
126 | 128 |
| |
|
0 commit comments
Comments
(0)