File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ You need to specify the array library to test. It can be specified via the
3636$ export ARRAY_API_TESTS_MODULE=array_api_strict
3737```
3838
39+ To specify a runtime-defined module, define ` xp ` using the ` exec('...') ` syntax:
40+
41+ ``` bash
42+ $ export ARRAY_API_TESTS_MODUle=exec(' import pint_array, numpy; xp = pint_array.pint_namespace(numpy)' )
43+ ```
44+
3945Alternately, import/define the ` xp ` variable in ` array_api_tests/__init__.py ` .
4046
4147### Specifying the API version
Original file line number Diff line number Diff line change 1414# you want to test, e.g. `import array_api_strict as xp`.
1515if "ARRAY_API_TESTS_MODULE" in os .environ :
1616 env_var = os .environ ["ARRAY_API_TESTS_MODULE" ]
17- if env_var .startswith ("exec(" ) and env_var .endswith (")" ):
17+ if env_var .startswith ("exec(' " ) and env_var .endswith ("' )" ):
1818 script = env_var [6 :][:- 2 ]
1919 namespace = {}
2020 exec (script , namespace )
You can’t perform that action at this time.
0 commit comments