Commit Graph

404 Commits

Author SHA1 Message Date
Dan Halbert 88c22d5052 remove last uses of 'u' prefix 2023-08-22 12:57:47 -04:00
Dan Halbert bfccb77ec1 asyncio test fixes and asyncio library updates 2023-08-18 13:16:16 -04:00
Jeff Epler 843fdbb250
Add a missing MP_PROTO_IMPLEMENT 2023-08-15 13:25:25 -05:00
Jeff Epler 94b89b7e57
enable exception chaining so we can run the test 2023-08-15 11:54:48 -05:00
Dan Halbert 3d48e87e60 jepler: fix 18 tests (redo commit to be correct) 2023-08-14 18:34:32 -04:00
Dan Halbert 545d434239 Revert "jepler: fix 18 tests"
This reverts commit 5ad35004cb.
2023-08-14 18:21:50 -04:00
Dan Halbert 5ad35004cb jepler: fix 18 tests 2023-08-14 17:53:38 -04:00
Dan Halbert b73f05fe64 turn off viper tests; thanks jepler 2023-08-14 16:43:07 -04:00
Dan Halbert 8cf5b6e707 fixes to unix port support; thanks @jepler 2023-08-14 09:51:52 -04:00
Dan Halbert d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Dan Halbert 2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert 27c7807693 silabs build needs work; other builds are working 2023-08-13 19:05:16 -04:00
Dan Halbert fe0e2f13bc wip; fix qstr processing 2023-08-10 20:06:32 -04:00
Dan Halbert 0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
Dan Halbert 0d4bc8c163 initial v1.19.1 merge; not compiled yet 2023-08-01 13:50:05 -04:00
Jeff Epler 164fcb22c2
Enable "from __future__ import annotations" on unix build 2023-07-10 13:53:26 -05:00
Jeff Epler fed8d5825b
synthio: add biquad filter type & basic filter calculations
the filter cannot be applied as yet.
2023-05-29 09:50:18 -05:00
Jeff Epler 4da32a7b86
Merge remote-tracking branch 'origin/main' into synthio-lfo-dag 2023-05-19 11:56:13 -05:00
Scott Shawcroft 9d11bda9e8
Fix memoryview.cast over sliced memoryview
Fixes #4758
2023-05-18 13:26:50 -07:00
Jeff Epler 391438102b
synthio: Finish implementing Math blocks 2023-05-17 16:32:20 -05:00
Jeff Epler f83212314e
synthio: Add LFOs 2023-05-15 21:15:39 -05:00
Jeff Epler a7da245ad0
synthio: Add synthio.Note
This class allows much more expressive sound synthesis:
 * tremolo & vibrato
 * arbitrary frequency
 * different evelope & waveform per note
 * all properties dynamically settable from Python code
2023-05-04 07:23:49 -05:00
Jeff Epler b9dea05dbf
Enable audiomixer on unix port, for testing 2023-04-05 09:02:03 -05:00
Jeff Epler b011468251
Add synthio.Synthesizer
In contrast to MidiTrack, this can be controlled from Python code,
turning notes on/off as desired.

Not tested on real HW yet, just the acceptance test based on checking
which notes it thinks are held internally.
2023-04-02 20:37:23 -05:00
Jeff Epler 13e17e6dcd
Make synthio debuggable in unix coverage port 2023-04-01 11:46:36 -05:00
hathach 8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
Jeff Epler 349dedca54
struct: Check that argument counts match, similar to cpython3
.. and test our struct module during the build-time tests

Closes #7771
2023-03-22 09:35:09 -05:00
hathach fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
foamyguy f2931dec7a empty RUN_BACKGROUND_TASKS for unix port 2023-03-14 18:26:23 -05:00
Scott Shawcroft 144aed40e3
Rename flag. Turn on UTF-8 and flag on unix
Also added label portion to the test.
2023-02-24 12:23:59 -08:00
gamblor21 5c2bd38684 Removed gifio module from tests 2023-02-13 09:40:16 -06:00
Jeff Epler 83bbfd1815
Allow the tests to directly call the non-heap using _int and _str variants
.. of getenv. These can have their own special bugs.
2022-12-28 12:36:58 -06:00
Jeff Epler aa63fae0ae
fix ports/unix builds besides coverage 2022-12-20 07:27:26 -06:00
Jeff Epler dd6dd5df21
rework the getenv test again
* use a virtual fat filesystem during the test
 * this makes the file I/O part more closely patch runtime which is nice
 * side-steps the need to add a special function for testing
   * but test still can't be run on a device, because the vfs calls
     are incompatible, and you intentionally can't remount "/" anyway
 * and side-steps problems with storing 'bad' toml files
2022-12-10 12:58:08 -06:00
Jeff Epler 3ab71d7448
Rename test function, make 'bad' files binary & add another test 2022-12-09 15:23:56 -06:00
Jeff Epler 6dca9db225
Rename test function & fix a bug with default value handling 2022-12-09 14:35:50 -06:00
Jeff Epler 1f504e5c0f
Remove line accidentally duplicated 2022-12-09 14:15:00 -06:00
Jeff Epler 3459fe322b
Withdraw the _environ module
This existed solely for testing, so expose it a different way during
the unix coverage build

Also turn off os.getenv support on samd21.
2022-12-08 15:33:10 -06:00
Jeff Epler ef2bfdb5db
dotenv becomes settings.toml 2022-12-08 12:44:20 -06:00
Jeff Epler f3169246ba
Implement chained exceptions
This adds the __cause__, __context__ and __suppress_context__
members to exception objects and makes e.g., `raise exc from cause`
set them in the same way as standard Python.
2022-11-13 19:52:50 -06:00
Jeff Epler 6a8bc738ec
Make it easy to test just a subset of tests
with e.g., 'make TEST_EXTRA="extmod/uasyncio*.py" test'
2022-10-14 17:07:27 -05:00
Jeff Epler 963a51487a
unix Makefile: easy wait to print test failures as diffs 2022-10-14 14:44:52 -05:00
Jeff Epler 52bca95208
Refactor dotenv module so that it can be tested on host
.. it needs to operate on a FILE* rather than FIL depending on
the build.

Note that this is comparing output to expected, not to cpython dotenv
package. Because run-tests.py starts the CPython interpreter with the
'-S' (skip site initialization) flag, pip-installed packages are
not available for import inside a test file. Instead, the exp
file is generated manually:
```
circuitpython/tests$ python3 circuitpython/dotenv_test.py > circuitpython/dotenv_test.py.exp
```

Unfortunately, the test fails on test e15:
```diff
FAILURE /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py
--- /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py.exp	2022-10-04 09:48:16.307703128 -0500
+++ /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py.out	2022-10-04 09:48:16.307703128 -0500
@@ -14,7 +14,7 @@
 line
 e13 e13value
 e14 None
-e15 e15value
+e15 None
 e16 #
 e17 def
 e18 #has a hash
```
2022-10-04 09:51:27 -05:00
Dan Halbert 7bb90dbf45 remove redundant port/*/.gitignore; cleanup others 2022-10-01 11:52:36 -04:00
Dan Halbert ea15a9118a ringbuf cleanup 2022-09-21 10:03:05 -04:00
Dan Halbert 51f2253cef no Russian font for SAMD21; adjust unix build warnings 2022-07-19 14:07:18 -04:00
Damien George ac3fb974bc unix/variants: Enable seeding random module on import in dev, coverage.
Signed-off-by: Damien George <damien@micropython.org>
2022-06-07 23:41:49 +10:00
Damien George d2f018bff1 unix,windows: Factor out code that generates random bytes to a new func.
Signed-off-by: Damien George <damien@micropython.org>
2022-06-07 23:41:30 +10:00
stijn 5bb2a85d74 windows: Use BCryptGenRandom to implement os.urandom.
Fix urandom not working on windows (there's no /dev/urandom) by using
a proper cryptographic random function (same one as CPython >= 3.11).
2022-06-07 23:32:30 +10:00
Jeff Epler 0a38088075
Fix dependencies for translate.c again 2022-06-07 07:35:54 +02:00