FEniCS / ffcx

Next generation FEniCS Form Compiler for finite element forms
https://fenicsproject.org
Other
144 stars 38 forks source link

Fix iowrapper warning #654

Closed jorgensd closed 7 months ago

jorgensd commented 7 months ago

Avoid getting:

  /root/shared/ffcx/ffcx/codegeneration/jit.py:69: ResourceWarning: unclosed file <_io.TextIOWrapper name='/root/.cache/fenics/libffcx_elements_3c34d6e913e7ee82cb1562136383f18dd61b39f3.c' mode='x' encoding='UTF-8'>
    open(c_filename, "x")
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

when creating new files. Ref: https://github.com/FEniCS/dolfinx/issues/2773#issuecomment-1896715275

coveralls commented 7 months ago

Coverage Status

coverage: 80.657% (+0.004%) from 80.653% when pulling 4d72522164a3a180e75a96ca8418bb0d3f0af732 on dokken/remove-io-wrapper-warning into 7c7530c83bf914f11128ea552c01c24ec95dc6f2 on main.