def test_sys_xoptions(self):
    for (xoptions, nframe) in (('tracemalloc', 1), ('tracemalloc=1', 1), ('tracemalloc=15', 15)):
        with self.subTest(xoptions=xoptions, nframe=nframe):
            code = 'import tracemalloc; print(tracemalloc.get_traceback_limit())'
            (ok, stdout, stderr) = assert_python_ok('-X', xoptions, '-c', code)
            stdout = stdout.rstrip()
            self.assertEqual(stdout, str(nframe).encode('ascii'))
def test_sys_xoptions(self):
    for (xoptions, nframe) in (('tracemalloc', 1), ('tracemalloc=1', 1), ('tracemalloc=15', 15)):
        with self.subTest(xoptions=xoptions, nframe=nframe):
            code = 'import tracemalloc; print(tracemalloc.get_traceback_limit())'
            (ok, stdout, stderr) = assert_python_ok('-X', xoptions, '-c', code)
            stdout = stdout.rstrip()
            self.assertEqual(stdout, str(nframe).encode('ascii'))