(selenium, dtype)
| 144 | ), |
| 145 | ) |
| 146 | def test_python2js_numpy_scalar(selenium, dtype): |
| 147 | selenium.load_package("numpy") |
| 148 | selenium.run("import numpy as np") |
| 149 | selenium.run( |
| 150 | f""" |
| 151 | x = np.{dtype}(1) |
| 152 | """ |
| 153 | ) |
| 154 | assert ( |
| 155 | selenium.run_js( |
| 156 | """ |
| 157 | return pyodide.globals.get('x') == 1 |
| 158 | """ |
| 159 | ) |
| 160 | is True |
| 161 | ) |
| 162 | selenium.run( |
| 163 | """ |
| 164 | x = x.byteswap().view(x.dtype.newbyteorder()) |
| 165 | """ |
| 166 | ) |
| 167 | assert ( |
| 168 | selenium.run_js( |
| 169 | """ |
| 170 | return pyodide.globals.get('x') == 1 |
| 171 | """ |
| 172 | ) |
| 173 | is True |
| 174 | ) |
| 175 | |
| 176 | |
| 177 | @pytest.mark.skip_pyproxy_check |
nothing calls this directly
no test coverage detected
searching dependent graphs…