Commit Graph

7 Commits

Author SHA1 Message Date
Damien George 26b4ef4c46 extmod/vfs_posix_file: Allow closing an already closed file.
Signed-off-by: Damien George <damien@micropython.org>
2021-02-11 22:54:41 +11:00
David Lechner 3dc324d3f1 tests: Format all Python code with black, except tests in basics subdir.
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.
2020-03-30 13:21:58 +11:00
Paul Sokolovsky 8212773adb tests: Use read() instead of readall(). 2016-11-14 00:27:35 +03:00
Damien George 117158fcd5 tests: Add tests for stream IO errors. 2015-12-23 22:37:02 +00:00
stijn a3efe04dce Use mode/encoding kwargs in io and unicode tests
mode argument is used to assert it works
encoding argument is used to make sure CPython uses the correct encoding
as it does not automatically use utf-8
2014-10-21 22:10:38 +03:00
Damien George d5f5b2f766 py, stream: Implement readlines for a stream. 2014-05-03 22:01:32 +01:00
Paul Sokolovsky 9954b4b99d Add directory for I/O tests with basic test for file methods. 2014-01-19 18:46:21 +02:00