1 |
On 02/14/2018 12:46 PM, Alec Warner wrote: |
2 |
> On Wed, Feb 14, 2018 at 3:38 PM, Zac Medico <zmedico@g.o |
3 |
> <mailto:zmedico@g.o>> wrote: |
4 |
> |
5 |
> Use sys.stdin.buffer instead of sys.stdin.buffer.raw, for buffered |
6 |
> input. |
7 |
> Also use raw bytes instead of unicode strings, in order to avoid making |
8 |
> assumptions about character encodings, and also to avoid overhead from |
9 |
> unicode decoding/encoding. |
10 |
> |
11 |
> |
12 |
> Maybe a functional test? |
13 |
|
14 |
In PATCH v2 I've added a unit test that compares expected output to |
15 |
actual output. |
16 |
|
17 |
> take real environment, check it into source code, run filter over it to |
18 |
> get output, run bash -n on output? |
19 |
> |
20 |
> Better ideas? |
21 |
|
22 |
We already have a number of tests that do the equivalent with a complete |
23 |
ebuild.sh by calling emerge. The resulting environment is sourced, and |
24 |
that will fail if the bash syntax is invalid. All of those tests failed |
25 |
for python3.4 here because it doesn't support the % operator with bytes |
26 |
operands: |
27 |
|
28 |
https://travis-ci.org/gentoo/portage/jobs/341614451 |
29 |
-- |
30 |
Thanks, |
31 |
Zac |