ai-content-maker/.venv/Lib/site-packages/numba/tests/test_locals.py

19 lines
335 B
Python
Raw Normal View History

2024-05-03 04:18:51 +03:00
from numba import float32, njit
import unittest
def foo():
x = 123
return x
class TestLocals(unittest.TestCase):
def test_seed_types(self):
cfunc = njit((), locals={'x': float32})(foo)
self.assertEqual(cfunc.nopython_signatures[0].return_type, float32)
if __name__ == '__main__':
unittest.main()