Takes in a temporary file for testing and returns the expected output and input paths Here expected output is essentially one of any of the possible generated files. ..note:: Since this does not actually run f2py, none of these are guaranteed to exist, and module nam
(fname_inp, mname="untitled")
| 16 | |
| 17 | |
| 18 | def get_io_paths(fname_inp, mname="untitled"): |
| 19 | """Takes in a temporary file for testing and returns the expected output and input paths |
| 20 | |
| 21 | Here expected output is essentially one of any of the possible generated |
| 22 | files. |
| 23 | |
| 24 | ..note:: |
| 25 | |
| 26 | Since this does not actually run f2py, none of these are guaranteed to |
| 27 | exist, and module names are typically incorrect |
| 28 | |
| 29 | Parameters |
| 30 | ---------- |
| 31 | fname_inp : str |
| 32 | The input filename |
| 33 | mname : str, optional |
| 34 | The name of the module, untitled by default |
| 35 | |
| 36 | Returns |
| 37 | ------- |
| 38 | genp : NamedTuple PPaths |
| 39 | The possible paths which are generated, not all of which exist |
| 40 | """ |
| 41 | bpath = Path(fname_inp) |
| 42 | return PPaths( |
| 43 | finp=bpath.with_suffix(".f"), |
| 44 | f90inp=bpath.with_suffix(".f90"), |
| 45 | pyf=bpath.with_suffix(".pyf"), |
| 46 | wrap77=bpath.with_name(f"{mname}-f2pywrappers.f"), |
| 47 | wrap90=bpath.with_name(f"{mname}-f2pywrappers2.f90"), |
| 48 | cmodf=bpath.with_name(f"{mname}module.c"), |
| 49 | ) |
| 50 | |
| 51 | |
| 52 | ############## |
no outgoing calls
no test coverage detected