| austin = <test.utils.Variant object at 0x105bb0190>, py = '3.8', mode = '-si'
|
| mode_meta = 'cpu', heap = ('-h', '64')
|
|
|
| @requires_sudo
|
| @pytest.mark.parametrize("heap", [tuple(), ("-h", "0"), ("-h", "64")])
|
| @pytest.mark.parametrize(
|
| "mode,mode_meta", [("-i", "wall"), ("-si", "cpu"), ("-Ci", "wall"), ("-Csi", "cpu")]
|
| )
|
| @allpythons()
|
| @variants
|
| def test_attach_wall_time(austin, py, mode, mode_meta, heap):
|
| with run_python(py, target("sleepy.py"), "2") as p:
|
| sleep(0.5)
|
|
|
| result = austin(mode, "2ms", *heap, "-p", str(p.pid))
|
| assert result.returncode == 0
|
|
|
| ts = threads(result.stdout)
|
| assert len(ts) == 1, compress(result.stdout)
|
|
|
| assert has_pattern(result.stdout, "sleepy.py:<module>:"), compress(
|
| result.stdout
|
| )
|
|
|
| meta = metadata(result.stdout)
|
|
|
| > assert meta["mode"] == mode_meta
|
| E AssertionError: assert 'wall' == 'cpu'
|
| E
|
| E - cpu
|
| E + wall
|
|
|
| test/functional/test_attach.py:70: AssertionError
|