Buckets:
| import platform | |
| import pytest | |
| from numpy.testing import IS_64BIT | |
| from . import util | |
| class TestMultiline(util.F2PyTest): | |
| suffix = ".pyf" | |
| module_name = "multiline" | |
| code = f""" | |
| python module {module_name} | |
| usercode ''' | |
| void foo(int* x) {{ | |
| char dummy = ';'; | |
| *x = 42; | |
| }} | |
| ''' | |
| interface | |
| subroutine foo(x) | |
| intent(c) foo | |
| integer intent(out) :: x | |
| end subroutine foo | |
| end interface | |
| end python module {module_name} | |
| """ | |
| def test_multiline(self): | |
| assert self.module.foo() == 42 | |
| class TestCallstatement(util.F2PyTest): | |
| suffix = ".pyf" | |
| module_name = "callstatement" | |
| code = f""" | |
| python module {module_name} | |
| usercode ''' | |
| void foo(int* x) {{ | |
| }} | |
| ''' | |
| interface | |
| subroutine foo(x) | |
| intent(c) foo | |
| integer intent(out) :: x | |
| callprotoargument int* | |
| callstatement {{ & | |
| ; & | |
| x = 42; & | |
| }} | |
| end subroutine foo | |
| end interface | |
| end python module {module_name} | |
| """ | |
| def test_callstatement(self): | |
| assert self.module.foo() == 42 | |
Xet Storage Details
- Size:
- 1.63 kB
- Xet hash:
- 3be744c8d45846813992b8f6552930e3050078bf688628e32608d6525d7051a9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.