test_f2py2e.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. import textwrap, re, sys, subprocess, shlex
  2. from pathlib import Path
  3. from collections import namedtuple
  4. import pytest
  5. from . import util
  6. from numpy.f2py.f2py2e import main as f2pycli
  7. #########################
  8. # CLI utils and classes #
  9. #########################
  10. PPaths = namedtuple("PPaths", "finp, f90inp, pyf, wrap77, wrap90, cmodf")
  11. def get_io_paths(fname_inp, mname="untitled"):
  12. """Takes in a temporary file for testing and returns the expected output and input paths
  13. Here expected output is essentially one of any of the possible generated
  14. files.
  15. ..note::
  16. Since this does not actually run f2py, none of these are guaranteed to
  17. exist, and module names are typically incorrect
  18. Parameters
  19. ----------
  20. fname_inp : str
  21. The input filename
  22. mname : str, optional
  23. The name of the module, untitled by default
  24. Returns
  25. -------
  26. genp : NamedTuple PPaths
  27. The possible paths which are generated, not all of which exist
  28. """
  29. bpath = Path(fname_inp)
  30. return PPaths(
  31. finp=bpath.with_suffix(".f"),
  32. f90inp=bpath.with_suffix(".f90"),
  33. pyf=bpath.with_suffix(".pyf"),
  34. wrap77=bpath.with_name(f"{mname}-f2pywrappers.f"),
  35. wrap90=bpath.with_name(f"{mname}-f2pywrappers2.f90"),
  36. cmodf=bpath.with_name(f"{mname}module.c"),
  37. )
  38. ##############
  39. # CLI Fixtures and Tests #
  40. #############
  41. @pytest.fixture(scope="session")
  42. def hello_world_f90(tmpdir_factory):
  43. """Generates a single f90 file for testing"""
  44. fdat = util.getpath("tests", "src", "cli", "hiworld.f90").read_text()
  45. fn = tmpdir_factory.getbasetemp() / "hello.f90"
  46. fn.write_text(fdat, encoding="ascii")
  47. return fn
  48. @pytest.fixture(scope="session")
  49. def hello_world_f77(tmpdir_factory):
  50. """Generates a single f77 file for testing"""
  51. fdat = util.getpath("tests", "src", "cli", "hi77.f").read_text()
  52. fn = tmpdir_factory.getbasetemp() / "hello.f"
  53. fn.write_text(fdat, encoding="ascii")
  54. return fn
  55. @pytest.fixture(scope="session")
  56. def retreal_f77(tmpdir_factory):
  57. """Generates a single f77 file for testing"""
  58. fdat = util.getpath("tests", "src", "return_real", "foo77.f").read_text()
  59. fn = tmpdir_factory.getbasetemp() / "foo.f"
  60. fn.write_text(fdat, encoding="ascii")
  61. return fn
  62. @pytest.fixture(scope="session")
  63. def f2cmap_f90(tmpdir_factory):
  64. """Generates a single f90 file for testing"""
  65. fdat = util.getpath("tests", "src", "f2cmap", "isoFortranEnvMap.f90").read_text()
  66. f2cmap = util.getpath("tests", "src", "f2cmap", ".f2py_f2cmap").read_text()
  67. fn = tmpdir_factory.getbasetemp() / "f2cmap.f90"
  68. fmap = tmpdir_factory.getbasetemp() / "mapfile"
  69. fn.write_text(fdat, encoding="ascii")
  70. fmap.write_text(f2cmap, encoding="ascii")
  71. return fn
  72. def test_gen_pyf(capfd, hello_world_f90, monkeypatch):
  73. """Ensures that a signature file is generated via the CLI
  74. CLI :: -h
  75. """
  76. ipath = Path(hello_world_f90)
  77. opath = Path(hello_world_f90).stem + ".pyf"
  78. monkeypatch.setattr(sys, "argv", f'f2py -h {opath} {ipath}'.split())
  79. with util.switchdir(ipath.parent):
  80. f2pycli() # Generate wrappers
  81. out, _ = capfd.readouterr()
  82. assert "Saving signatures to file" in out
  83. assert Path(f'{opath}').exists()
  84. def test_gen_pyf_stdout(capfd, hello_world_f90, monkeypatch):
  85. """Ensures that a signature file can be dumped to stdout
  86. CLI :: -h
  87. """
  88. ipath = Path(hello_world_f90)
  89. monkeypatch.setattr(sys, "argv", f'f2py -h stdout {ipath}'.split())
  90. with util.switchdir(ipath.parent):
  91. f2pycli()
  92. out, _ = capfd.readouterr()
  93. assert "Saving signatures to file" in out
  94. assert "function hi() ! in " in out
  95. def test_gen_pyf_no_overwrite(capfd, hello_world_f90, monkeypatch):
  96. """Ensures that the CLI refuses to overwrite signature files
  97. CLI :: -h without --overwrite-signature
  98. """
  99. ipath = Path(hello_world_f90)
  100. monkeypatch.setattr(sys, "argv", f'f2py -h faker.pyf {ipath}'.split())
  101. with util.switchdir(ipath.parent):
  102. Path("faker.pyf").write_text("Fake news", encoding="ascii")
  103. with pytest.raises(SystemExit):
  104. f2pycli() # Refuse to overwrite
  105. _, err = capfd.readouterr()
  106. assert "Use --overwrite-signature to overwrite" in err
  107. @pytest.mark.xfail
  108. def test_f2py_skip(capfd, retreal_f77, monkeypatch):
  109. """Tests that functions can be skipped
  110. CLI :: skip:
  111. """
  112. foutl = get_io_paths(retreal_f77, mname="test")
  113. ipath = foutl.finp
  114. toskip = "t0 t4 t8 sd s8 s4"
  115. remaining = "td s0"
  116. monkeypatch.setattr(
  117. sys, "argv",
  118. f'f2py {ipath} -m test skip: {toskip}'.split())
  119. with util.switchdir(ipath.parent):
  120. f2pycli()
  121. out, err = capfd.readouterr()
  122. for skey in toskip.split():
  123. assert (
  124. f'buildmodule: Could not found the body of interfaced routine "{skey}". Skipping.'
  125. in err)
  126. for rkey in remaining.split():
  127. assert f'Constructing wrapper function "{rkey}"' in out
  128. def test_f2py_only(capfd, retreal_f77, monkeypatch):
  129. """Test that functions can be kept by only:
  130. CLI :: only:
  131. """
  132. foutl = get_io_paths(retreal_f77, mname="test")
  133. ipath = foutl.finp
  134. toskip = "t0 t4 t8 sd s8 s4"
  135. tokeep = "td s0"
  136. monkeypatch.setattr(
  137. sys, "argv",
  138. f'f2py {ipath} -m test only: {tokeep}'.split())
  139. with util.switchdir(ipath.parent):
  140. f2pycli()
  141. out, err = capfd.readouterr()
  142. for skey in toskip.split():
  143. assert (
  144. f'buildmodule: Could not find the body of interfaced routine "{skey}". Skipping.'
  145. in err)
  146. for rkey in tokeep.split():
  147. assert f'Constructing wrapper function "{rkey}"' in out
  148. def test_file_processing_switch(capfd, hello_world_f90, retreal_f77,
  149. monkeypatch):
  150. """Tests that it is possible to return to file processing mode
  151. CLI :: :
  152. BUG: numpy-gh #20520
  153. """
  154. foutl = get_io_paths(retreal_f77, mname="test")
  155. ipath = foutl.finp
  156. toskip = "t0 t4 t8 sd s8 s4"
  157. ipath2 = Path(hello_world_f90)
  158. tokeep = "td s0 hi" # hi is in ipath2
  159. mname = "blah"
  160. monkeypatch.setattr(
  161. sys,
  162. "argv",
  163. f'f2py {ipath} -m {mname} only: {tokeep} : {ipath2}'.split(
  164. ),
  165. )
  166. with util.switchdir(ipath.parent):
  167. f2pycli()
  168. out, err = capfd.readouterr()
  169. for skey in toskip.split():
  170. assert (
  171. f'buildmodule: Could not find the body of interfaced routine "{skey}". Skipping.'
  172. in err)
  173. for rkey in tokeep.split():
  174. assert f'Constructing wrapper function "{rkey}"' in out
  175. def test_mod_gen_f77(capfd, hello_world_f90, monkeypatch):
  176. """Checks the generation of files based on a module name
  177. CLI :: -m
  178. """
  179. MNAME = "hi"
  180. foutl = get_io_paths(hello_world_f90, mname=MNAME)
  181. ipath = foutl.f90inp
  182. monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m {MNAME}'.split())
  183. with util.switchdir(ipath.parent):
  184. f2pycli()
  185. # Always generate C module
  186. assert Path.exists(foutl.cmodf)
  187. # File contains a function, check for F77 wrappers
  188. assert Path.exists(foutl.wrap77)
  189. def test_lower_cmod(capfd, hello_world_f77, monkeypatch):
  190. """Lowers cases by flag or when -h is present
  191. CLI :: --[no-]lower
  192. """
  193. foutl = get_io_paths(hello_world_f77, mname="test")
  194. ipath = foutl.finp
  195. capshi = re.compile(r"HI\(\)")
  196. capslo = re.compile(r"hi\(\)")
  197. # Case I: --lower is passed
  198. monkeypatch.setattr(sys, "argv", f'f2py {ipath} -m test --lower'.split())
  199. with util.switchdir(ipath.parent):
  200. f2pycli()
  201. out, _ = capfd.readouterr()
  202. assert capslo.search(out) is not None
  203. assert capshi.search(out) is None
  204. # Case II: --no-lower is passed
  205. monkeypatch.setattr(sys, "argv",
  206. f'f2py {ipath} -m test --no-lower'.split())
  207. with util.switchdir(ipath.parent):
  208. f2pycli()
  209. out, _ = capfd.readouterr()
  210. assert capslo.search(out) is None
  211. assert capshi.search(out) is not None
  212. def test_lower_sig(capfd, hello_world_f77, monkeypatch):
  213. """Lowers cases in signature files by flag or when -h is present
  214. CLI :: --[no-]lower -h
  215. """
  216. foutl = get_io_paths(hello_world_f77, mname="test")
  217. ipath = foutl.finp
  218. # Signature files
  219. capshi = re.compile(r"Block: HI")
  220. capslo = re.compile(r"Block: hi")
  221. # Case I: --lower is implied by -h
  222. # TODO: Clean up to prevent passing --overwrite-signature
  223. monkeypatch.setattr(
  224. sys,
  225. "argv",
  226. f'f2py {ipath} -h {foutl.pyf} -m test --overwrite-signature'.split(),
  227. )
  228. with util.switchdir(ipath.parent):
  229. f2pycli()
  230. out, _ = capfd.readouterr()
  231. assert capslo.search(out) is not None
  232. assert capshi.search(out) is None
  233. # Case II: --no-lower overrides -h
  234. monkeypatch.setattr(
  235. sys,
  236. "argv",
  237. f'f2py {ipath} -h {foutl.pyf} -m test --overwrite-signature --no-lower'
  238. .split(),
  239. )
  240. with util.switchdir(ipath.parent):
  241. f2pycli()
  242. out, _ = capfd.readouterr()
  243. assert capslo.search(out) is None
  244. assert capshi.search(out) is not None
  245. def test_build_dir(capfd, hello_world_f90, monkeypatch):
  246. """Ensures that the build directory can be specified
  247. CLI :: --build-dir
  248. """
  249. ipath = Path(hello_world_f90)
  250. mname = "blah"
  251. odir = "tttmp"
  252. monkeypatch.setattr(sys, "argv",
  253. f'f2py -m {mname} {ipath} --build-dir {odir}'.split())
  254. with util.switchdir(ipath.parent):
  255. f2pycli()
  256. out, _ = capfd.readouterr()
  257. assert f"Wrote C/API module \"{mname}\"" in out
  258. def test_overwrite(capfd, hello_world_f90, monkeypatch):
  259. """Ensures that the build directory can be specified
  260. CLI :: --overwrite-signature
  261. """
  262. ipath = Path(hello_world_f90)
  263. monkeypatch.setattr(
  264. sys, "argv",
  265. f'f2py -h faker.pyf {ipath} --overwrite-signature'.split())
  266. with util.switchdir(ipath.parent):
  267. Path("faker.pyf").write_text("Fake news", encoding="ascii")
  268. f2pycli()
  269. out, _ = capfd.readouterr()
  270. assert "Saving signatures to file" in out
  271. def test_latexdoc(capfd, hello_world_f90, monkeypatch):
  272. """Ensures that TeX documentation is written out
  273. CLI :: --latex-doc
  274. """
  275. ipath = Path(hello_world_f90)
  276. mname = "blah"
  277. monkeypatch.setattr(sys, "argv",
  278. f'f2py -m {mname} {ipath} --latex-doc'.split())
  279. with util.switchdir(ipath.parent):
  280. f2pycli()
  281. out, _ = capfd.readouterr()
  282. assert "Documentation is saved to file" in out
  283. with Path(f"{mname}module.tex").open() as otex:
  284. assert "\\documentclass" in otex.read()
  285. def test_nolatexdoc(capfd, hello_world_f90, monkeypatch):
  286. """Ensures that TeX documentation is written out
  287. CLI :: --no-latex-doc
  288. """
  289. ipath = Path(hello_world_f90)
  290. mname = "blah"
  291. monkeypatch.setattr(sys, "argv",
  292. f'f2py -m {mname} {ipath} --no-latex-doc'.split())
  293. with util.switchdir(ipath.parent):
  294. f2pycli()
  295. out, _ = capfd.readouterr()
  296. assert "Documentation is saved to file" not in out
  297. def test_shortlatex(capfd, hello_world_f90, monkeypatch):
  298. """Ensures that truncated documentation is written out
  299. TODO: Test to ensure this has no effect without --latex-doc
  300. CLI :: --latex-doc --short-latex
  301. """
  302. ipath = Path(hello_world_f90)
  303. mname = "blah"
  304. monkeypatch.setattr(
  305. sys,
  306. "argv",
  307. f'f2py -m {mname} {ipath} --latex-doc --short-latex'.split(),
  308. )
  309. with util.switchdir(ipath.parent):
  310. f2pycli()
  311. out, _ = capfd.readouterr()
  312. assert "Documentation is saved to file" in out
  313. with Path(f"./{mname}module.tex").open() as otex:
  314. assert "\\documentclass" not in otex.read()
  315. def test_restdoc(capfd, hello_world_f90, monkeypatch):
  316. """Ensures that RsT documentation is written out
  317. CLI :: --rest-doc
  318. """
  319. ipath = Path(hello_world_f90)
  320. mname = "blah"
  321. monkeypatch.setattr(sys, "argv",
  322. f'f2py -m {mname} {ipath} --rest-doc'.split())
  323. with util.switchdir(ipath.parent):
  324. f2pycli()
  325. out, _ = capfd.readouterr()
  326. assert "ReST Documentation is saved to file" in out
  327. with Path(f"./{mname}module.rest").open() as orst:
  328. assert r".. -*- rest -*-" in orst.read()
  329. def test_norestexdoc(capfd, hello_world_f90, monkeypatch):
  330. """Ensures that TeX documentation is written out
  331. CLI :: --no-rest-doc
  332. """
  333. ipath = Path(hello_world_f90)
  334. mname = "blah"
  335. monkeypatch.setattr(sys, "argv",
  336. f'f2py -m {mname} {ipath} --no-rest-doc'.split())
  337. with util.switchdir(ipath.parent):
  338. f2pycli()
  339. out, _ = capfd.readouterr()
  340. assert "ReST Documentation is saved to file" not in out
  341. def test_debugcapi(capfd, hello_world_f90, monkeypatch):
  342. """Ensures that debugging wrappers are written
  343. CLI :: --debug-capi
  344. """
  345. ipath = Path(hello_world_f90)
  346. mname = "blah"
  347. monkeypatch.setattr(sys, "argv",
  348. f'f2py -m {mname} {ipath} --debug-capi'.split())
  349. with util.switchdir(ipath.parent):
  350. f2pycli()
  351. with Path(f"./{mname}module.c").open() as ocmod:
  352. assert r"#define DEBUGCFUNCS" in ocmod.read()
  353. @pytest.mark.xfail(reason="Consistently fails on CI.")
  354. def test_debugcapi_bld(hello_world_f90, monkeypatch):
  355. """Ensures that debugging wrappers work
  356. CLI :: --debug-capi -c
  357. """
  358. ipath = Path(hello_world_f90)
  359. mname = "blah"
  360. monkeypatch.setattr(sys, "argv",
  361. f'f2py -m {mname} {ipath} -c --debug-capi'.split())
  362. with util.switchdir(ipath.parent):
  363. f2pycli()
  364. cmd_run = shlex.split("python3 -c \"import blah; blah.hi()\"")
  365. rout = subprocess.run(cmd_run, capture_output=True, encoding='UTF-8')
  366. eout = ' Hello World\n'
  367. eerr = textwrap.dedent("""\
  368. debug-capi:Python C/API function blah.hi()
  369. debug-capi:float hi=:output,hidden,scalar
  370. debug-capi:hi=0
  371. debug-capi:Fortran subroutine `f2pywraphi(&hi)'
  372. debug-capi:hi=0
  373. debug-capi:Building return value.
  374. debug-capi:Python C/API function blah.hi: successful.
  375. debug-capi:Freeing memory.
  376. """)
  377. assert rout.stdout == eout
  378. assert rout.stderr == eerr
  379. def test_wrapfunc_def(capfd, hello_world_f90, monkeypatch):
  380. """Ensures that fortran subroutine wrappers for F77 are included by default
  381. CLI :: --[no]-wrap-functions
  382. """
  383. # Implied
  384. ipath = Path(hello_world_f90)
  385. mname = "blah"
  386. monkeypatch.setattr(sys, "argv", f'f2py -m {mname} {ipath}'.split())
  387. with util.switchdir(ipath.parent):
  388. f2pycli()
  389. out, _ = capfd.readouterr()
  390. assert r"Fortran 77 wrappers are saved to" in out
  391. # Explicit
  392. monkeypatch.setattr(sys, "argv",
  393. f'f2py -m {mname} {ipath} --wrap-functions'.split())
  394. with util.switchdir(ipath.parent):
  395. f2pycli()
  396. out, _ = capfd.readouterr()
  397. assert r"Fortran 77 wrappers are saved to" in out
  398. def test_nowrapfunc(capfd, hello_world_f90, monkeypatch):
  399. """Ensures that fortran subroutine wrappers for F77 can be disabled
  400. CLI :: --no-wrap-functions
  401. """
  402. ipath = Path(hello_world_f90)
  403. mname = "blah"
  404. monkeypatch.setattr(sys, "argv",
  405. f'f2py -m {mname} {ipath} --no-wrap-functions'.split())
  406. with util.switchdir(ipath.parent):
  407. f2pycli()
  408. out, _ = capfd.readouterr()
  409. assert r"Fortran 77 wrappers are saved to" not in out
  410. def test_inclheader(capfd, hello_world_f90, monkeypatch):
  411. """Add to the include directories
  412. CLI :: -include
  413. TODO: Document this in the help string
  414. """
  415. ipath = Path(hello_world_f90)
  416. mname = "blah"
  417. monkeypatch.setattr(
  418. sys,
  419. "argv",
  420. f'f2py -m {mname} {ipath} -include<stdbool.h> -include<stdio.h> '.
  421. split(),
  422. )
  423. with util.switchdir(ipath.parent):
  424. f2pycli()
  425. with Path(f"./{mname}module.c").open() as ocmod:
  426. ocmr = ocmod.read()
  427. assert "#include <stdbool.h>" in ocmr
  428. assert "#include <stdio.h>" in ocmr
  429. def test_inclpath():
  430. """Add to the include directories
  431. CLI :: --include-paths
  432. """
  433. # TODO: populate
  434. pass
  435. def test_hlink():
  436. """Add to the include directories
  437. CLI :: --help-link
  438. """
  439. # TODO: populate
  440. pass
  441. def test_f2cmap(capfd, f2cmap_f90, monkeypatch):
  442. """Check that Fortran-to-Python KIND specs can be passed
  443. CLI :: --f2cmap
  444. """
  445. ipath = Path(f2cmap_f90)
  446. monkeypatch.setattr(sys, "argv", f'f2py -m blah {ipath} --f2cmap mapfile'.split())
  447. with util.switchdir(ipath.parent):
  448. f2pycli()
  449. out, _ = capfd.readouterr()
  450. assert "Reading f2cmap from 'mapfile' ..." in out
  451. assert "Mapping \"real(kind=real32)\" to \"float\"" in out
  452. assert "Mapping \"real(kind=real64)\" to \"double\"" in out
  453. assert "Mapping \"integer(kind=int64)\" to \"long_long\"" in out
  454. assert "Successfully applied user defined f2cmap changes" in out
  455. def test_quiet(capfd, hello_world_f90, monkeypatch):
  456. """Reduce verbosity
  457. CLI :: --quiet
  458. """
  459. ipath = Path(hello_world_f90)
  460. monkeypatch.setattr(sys, "argv", f'f2py -m blah {ipath} --quiet'.split())
  461. with util.switchdir(ipath.parent):
  462. f2pycli()
  463. out, _ = capfd.readouterr()
  464. assert len(out) == 0
  465. def test_verbose(capfd, hello_world_f90, monkeypatch):
  466. """Increase verbosity
  467. CLI :: --verbose
  468. """
  469. ipath = Path(hello_world_f90)
  470. monkeypatch.setattr(sys, "argv", f'f2py -m blah {ipath} --verbose'.split())
  471. with util.switchdir(ipath.parent):
  472. f2pycli()
  473. out, _ = capfd.readouterr()
  474. assert "analyzeline" in out
  475. def test_version(capfd, monkeypatch):
  476. """Ensure version
  477. CLI :: -v
  478. """
  479. monkeypatch.setattr(sys, "argv", 'f2py -v'.split())
  480. # TODO: f2py2e should not call sys.exit() after printing the version
  481. with pytest.raises(SystemExit):
  482. f2pycli()
  483. out, _ = capfd.readouterr()
  484. import numpy as np
  485. assert np.__version__ == out.strip()
  486. @pytest.mark.xfail(reason="Consistently fails on CI.")
  487. def test_npdistop(hello_world_f90, monkeypatch):
  488. """
  489. CLI :: -c
  490. """
  491. ipath = Path(hello_world_f90)
  492. monkeypatch.setattr(sys, "argv", f'f2py -m blah {ipath} -c'.split())
  493. with util.switchdir(ipath.parent):
  494. f2pycli()
  495. cmd_run = shlex.split("python -c \"import blah; blah.hi()\"")
  496. rout = subprocess.run(cmd_run, capture_output=True, encoding='UTF-8')
  497. eout = ' Hello World\n'
  498. assert rout.stdout == eout
  499. # Numpy distutils flags
  500. # TODO: These should be tested separately
  501. def test_npd_fcompiler():
  502. """
  503. CLI :: -c --fcompiler
  504. """
  505. # TODO: populate
  506. pass
  507. def test_npd_compiler():
  508. """
  509. CLI :: -c --compiler
  510. """
  511. # TODO: populate
  512. pass
  513. def test_npd_help_fcompiler():
  514. """
  515. CLI :: -c --help-fcompiler
  516. """
  517. # TODO: populate
  518. pass
  519. def test_npd_f77exec():
  520. """
  521. CLI :: -c --f77exec
  522. """
  523. # TODO: populate
  524. pass
  525. def test_npd_f90exec():
  526. """
  527. CLI :: -c --f90exec
  528. """
  529. # TODO: populate
  530. pass
  531. def test_npd_f77flags():
  532. """
  533. CLI :: -c --f77flags
  534. """
  535. # TODO: populate
  536. pass
  537. def test_npd_f90flags():
  538. """
  539. CLI :: -c --f90flags
  540. """
  541. # TODO: populate
  542. pass
  543. def test_npd_opt():
  544. """
  545. CLI :: -c --opt
  546. """
  547. # TODO: populate
  548. pass
  549. def test_npd_arch():
  550. """
  551. CLI :: -c --arch
  552. """
  553. # TODO: populate
  554. pass
  555. def test_npd_noopt():
  556. """
  557. CLI :: -c --noopt
  558. """
  559. # TODO: populate
  560. pass
  561. def test_npd_noarch():
  562. """
  563. CLI :: -c --noarch
  564. """
  565. # TODO: populate
  566. pass
  567. def test_npd_debug():
  568. """
  569. CLI :: -c --debug
  570. """
  571. # TODO: populate
  572. pass
  573. def test_npd_link_auto():
  574. """
  575. CLI :: -c --link-<resource>
  576. """
  577. # TODO: populate
  578. pass
  579. def test_npd_lib():
  580. """
  581. CLI :: -c -L/path/to/lib/ -l<libname>
  582. """
  583. # TODO: populate
  584. pass
  585. def test_npd_define():
  586. """
  587. CLI :: -D<define>
  588. """
  589. # TODO: populate
  590. pass
  591. def test_npd_undefine():
  592. """
  593. CLI :: -U<name>
  594. """
  595. # TODO: populate
  596. pass
  597. def test_npd_incl():
  598. """
  599. CLI :: -I/path/to/include/
  600. """
  601. # TODO: populate
  602. pass
  603. def test_npd_linker():
  604. """
  605. CLI :: <filename>.o <filename>.so <filename>.a
  606. """
  607. # TODO: populate
  608. pass