<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openmano-mpy/tests/unicode, branch master</title>
<subtitle>MicroPython source and hardware configuration for OpenMano</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/'/>
<entry>
<title>tests: Format all Python code with black, except tests in basics subdir.</title>
<updated>2020-03-30T02:21:58+00:00</updated>
<author>
<name>David Lechner</name>
</author>
<published>2020-03-23T02:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=3dc324d3f1312e40d3a8ed87e7244966bb756f26'/>
<id>3dc324d3f1312e40d3a8ed87e7244966bb756f26</id>
<content type='text'>
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py.  The basics/ subdirectory is excluded for now so we
aren't changing too much at once.

In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
</pre>
</div>
</content>
</entry>
<entry>
<title>py/objslice: Add support for indices() method on slice objects.</title>
<updated>2019-12-28T12:55:15+00:00</updated>
<author>
<name>Nicko van Someren</name>
</author>
<published>2019-11-17T00:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=4c93955b7b4d3d860aed1551ca6231ac4e388e69'/>
<id>4c93955b7b4d3d860aed1551ca6231ac4e388e69</id>
<content type='text'>
Instances of the slice class are passed to __getitem__() on objects when
the user indexes them with a slice.  In practice the majority of the time
(other than passing it on untouched) is to work out what the slice means in
the context of an array dimension of a particular length.  Since Python 2.3
there has been a method on the slice class, indices(), that takes a
dimension length and returns the real start, stop and step, accounting for
missing or negative values in the slice spec.  This commit implements such
a indices() method on the slice class.

It is configurable at compile-time via MICROPY_PY_BUILTINS_SLICE_INDICES,
disabled by default, enabled on unix, stm32 and esp32 ports.

This commit also adds new tests for slice indices and for slicing unicode
strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instances of the slice class are passed to __getitem__() on objects when
the user indexes them with a slice.  In practice the majority of the time
(other than passing it on untouched) is to work out what the slice means in
the context of an array dimension of a particular length.  Since Python 2.3
there has been a method on the slice class, indices(), that takes a
dimension length and returns the real start, stop and step, accounting for
missing or negative values in the slice spec.  This commit implements such
a indices() method on the slice class.

It is configurable at compile-time via MICROPY_PY_BUILTINS_SLICE_INDICES,
disabled by default, enabled on unix, stm32 and esp32 ports.

This commit also adds new tests for slice indices and for slicing unicode
strings.
</pre>
</div>
</content>
</entry>
<entry>
<title>py/unicode: Fix check for valid utf8 being stricter about contn chars.</title>
<updated>2018-11-26T05:13:08+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2018-11-26T05:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=7c85c7c210e3ad417f59038de95b71618783d76c'/>
<id>7c85c7c210e3ad417f59038de95b71618783d76c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>py/objstr: Add check for valid UTF-8 when making a str from bytes.</title>
<updated>2017-09-06T06:43:09+00:00</updated>
<author>
<name>tll</name>
</author>
<published>2017-06-24T00:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=68c28174d0e0ec3f6b1461aea3a0b6a1b84610bb'/>
<id>68c28174d0e0ec3f6b1461aea3a0b6a1b84610bb</id>
<content type='text'>
This patch adds a function utf8_check() to check for a valid UTF-8 encoded
string, and calls it when constructing a str from raw bytes.  The feature
is selectable at compile time via MICROPY_PY_BUILTINS_STR_UNICODE_CHECK and
is enabled if unicode is enabled.  It costs about 110 bytes on Thumb-2, 150
bytes on Xtensa and 170 bytes on x86-64.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a function utf8_check() to check for a valid UTF-8 encoded
string, and calls it when constructing a str from raw bytes.  The feature
is selectable at compile time via MICROPY_PY_BUILTINS_STR_UNICODE_CHECK and
is enabled if unicode is enabled.  It costs about 110 bytes on Thumb-2, 150
bytes on Xtensa and 170 bytes on x86-64.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Improve coverage of array, range, dict, slice, exc, unicode.</title>
<updated>2016-10-17T00:43:47+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2016-10-17T00:43:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=e9404e5f5f058db954ac0a92cb5acfcef6f6724a'/>
<id>e9404e5f5f058db954ac0a92cb5acfcef6f6724a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/unicode_subscr.py: Detailed test for subscripting unicode strings.</title>
<updated>2016-07-25T16:28:19+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
</author>
<published>2016-07-25T16:27:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=d1771bbae0f68e2700c56aa8b97819b2acb55a7a'/>
<id>d1771bbae0f68e2700c56aa8b97819b2acb55a7a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Move int+unicode test to unicode-specific test directory.</title>
<updated>2015-09-07T20:36:24+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2015-09-07T20:36:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=75a811a6df51392868ba35e9e341d882b842b066'/>
<id>75a811a6df51392868ba35e9e341d882b842b066</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>py/lexer: Raise SyntaxError when unicode char point out of range.</title>
<updated>2015-09-07T16:19:17+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2015-09-07T16:19:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=0be3c70cd88da39ee4dcc328ba3bde1e5abcd406'/>
<id>0be3c70cd88da39ee4dcc328ba3bde1e5abcd406</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>py/objstr: Make string formatting 8-bit clean.</title>
<updated>2015-08-29T22:13:51+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2015-08-26T14:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=51b9a0d0c4dfa265739708016ad85513d330987f'/>
<id>51b9a0d0c4dfa265739708016ad85513d330987f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>py: Support unicode (utf-8 encoded) identifiers in Python source.</title>
<updated>2015-06-09T10:58:07+00:00</updated>
<author>
<name>Damien George</name>
</author>
<published>2015-06-09T10:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/openmano-mpy/commit/?id=7ed58cb66379f4d87e3e8fbb68baada19048ac18'/>
<id>7ed58cb66379f4d87e3e8fbb68baada19048ac18</id>
<content type='text'>
Enabled simply by making the identifier lexing code 8-bit clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enabled simply by making the identifier lexing code 8-bit clean.
</pre>
</div>
</content>
</entry>
</feed>
