Codebase list python-procrunner / a99bc47
Fix resource warnings thanks to PDM (#68) * Run Azure tests in python development mode * Fix identified resource leaks Markus Gerstel authored 3 years ago GitHub committed 3 years ago
4 changed file(s) with 8 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
44 2.3.0 (????-??-??)
55 ------------------
66 * Python 3.6+ only, support for Python 3.5 has been dropped
7 * Fix a file descriptor leak on subprocess execution
78
89 2.2.0 (2020-09-07)
910 ------------------
131131 else:
132132 if self._closing:
133133 break
134 self._stream.close()
134135 self._terminated = True
135136 la.flush()
136137 if self._debug:
150151 print(linedecode)
151152 if callback:
152153 callback(linedecode)
154 self._stream.close()
153155 self._terminated = True
154156 if self._debug:
155157 logger.debug("Stream reader terminated")
5555 def test_path_object_resolution(tmp_path):
5656 sentinel_value = b"sentinel"
5757 tmp_path.joinpath("tempfile").write_bytes(sentinel_value)
58 tmp_path.joinpath("reader.py").write_text("print(open('tempfile').read())")
58 tmp_path.joinpath("reader.py").write_text(
59 "with open('tempfile') as fh:\n print(fh.read())"
60 )
5961 assert "LEAK_DETECTOR" not in os.environ
6062 result = procrunner.run(
6163 [sys.executable, tmp_path / "reader.py"],
1313 pytest-azurepipelines
1414 pytest-cov
1515 -r{toxinidir}/requirements_dev.txt
16 setenv =
17 PYTHONDEVMODE = 1
1618 commands =
1719 pytest -ra --basetemp={envtmpdir} --cov=procrunner --cov-report=html --cov-report=xml --cov-branch
1820