MCPcopy Create free account
hub / github.com/numpy/numpy / get_io_paths

Function get_io_paths

numpy/f2py/tests/test_f2py2e.py:18–49  ·  view source on GitHub ↗

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")

Source from the content-addressed store, hash-verified

16
17
18def 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##############

Callers 9

test_gh23598_warnFunction · 0.85
test_f2py_skipFunction · 0.85
test_f2py_onlyFunction · 0.85
test_mod_gen_f77Function · 0.85
test_mod_gen_gh25263Function · 0.85
test_lower_cmodFunction · 0.85
test_lower_sigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected