fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 10 | generate_folders | def | function | def generate_folders(root, elements, *more_numbers):
fill_len = len(str(elements))
if more_numbers:
for i in range(elements):
new_folder = root.joinpath(f"foo_{i:0>{fill_len}}")
new_folder.mkdir()
new_folder.joinpath("__init__.py").write_bytes(TEST_CONTENT)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 14 | joinpath | ref | function | new_folder = root.joinpath(f"foo_{i:0>{fill_len}}")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 15 | mkdir | ref | function | new_folder.mkdir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 16 | joinpath | ref | function | new_folder.joinpath("__init__.py").write_bytes(TEST_CONTENT)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 16 | write_bytes | ref | function | new_folder.joinpath("__init__.py").write_bytes(TEST_CONTENT)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 17 | generate_folders | ref | function | generate_folders(new_folder, *more_numbers)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 20 | joinpath | ref | function | new_test = root.joinpath(f"test_{i:0<{fill_len}}.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 21 | write_bytes | ref | function | new_test.write_bytes(TEST_CONTENT)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 25 | parse_args | ref | function | args = parser.parse_args()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/generate_folders.py | testing/example_scripts/perf_examples/collect_stats/generate_folders.py | 26 | generate_folders | ref | function | generate_folders(HERE, *(args.numbers or (10, 100)))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/template_test.py | testing/example_scripts/perf_examples/collect_stats/template_test.py | 0 | test_x | def | function | def test_x():
pass
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/perf_examples/collect_stats/template_test.py | testing/example_scripts/perf_examples/collect_stats/template_test.py | -1 | test_x | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/tmpdir/tmp_path_fixture.py | testing/example_scripts/tmpdir/tmp_path_fixture.py | 3 | parametrize | ref | function | @pytest.mark.parametrize("a", [r"qwe/\abc"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/tmpdir/tmp_path_fixture.py | testing/example_scripts/tmpdir/tmp_path_fixture.py | 4 | test_fixture | def | function | def test_fixture(tmp_path, a):
assert tmp_path.is_dir()
assert list(tmp_path.iterdir()) == []
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/tmpdir/tmp_path_fixture.py | testing/example_scripts/tmpdir/tmp_path_fixture.py | 5 | is_dir | ref | function | assert tmp_path.is_dir()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/tmpdir/tmp_path_fixture.py | testing/example_scripts/tmpdir/tmp_path_fixture.py | 6 | iterdir | ref | function | assert list(tmp_path.iterdir()) == []
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | 5 | fixture | ref | function | @pytest.fixture(params=[1, 2])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | 6 | two | def | function | def two(request):
return request.param
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | 10 | usefixtures | ref | function | @pytest.mark.usefixtures("two")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | 11 | TestSomethingElse | def | class | test_two |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | testing/example_scripts/unittest/test_parametrized_fixture_error_message.py | 12 | test_two | def | function | def test_two(self):
pass
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip.py | testing/example_scripts/unittest/test_setup_skip.py | 4 | Base | def | class | setUp |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip.py | testing/example_scripts/unittest/test_setup_skip.py | 5 | setUp | def | function | def setUp(self):
assert 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip.py | testing/example_scripts/unittest/test_setup_skip.py | 9 | skip | ref | function | @unittest.skip("skip all tests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip.py | testing/example_scripts/unittest/test_setup_skip.py | 10 | Test | def | class | test_foo |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip.py | testing/example_scripts/unittest/test_setup_skip.py | 11 | test_foo | def | function | def test_foo(self):
assert 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_class.py | testing/example_scripts/unittest/test_setup_skip_class.py | 4 | Base | def | class | setUpClass |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_class.py | testing/example_scripts/unittest/test_setup_skip_class.py | 6 | setUpClass | def | function | def setUpClass(cls):
assert 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_class.py | testing/example_scripts/unittest/test_setup_skip_class.py | 10 | skip | ref | function | @unittest.skip("skip all tests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_class.py | testing/example_scripts/unittest/test_setup_skip_class.py | 11 | Test | def | class | test_foo |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_class.py | testing/example_scripts/unittest/test_setup_skip_class.py | 12 | test_foo | def | function | def test_foo(self):
assert 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_module.py | testing/example_scripts/unittest/test_setup_skip_module.py | 4 | setUpModule | def | function | def setUpModule():
assert 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_module.py | testing/example_scripts/unittest/test_setup_skip_module.py | 8 | skip | ref | function | @unittest.skip("skip all tests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_module.py | testing/example_scripts/unittest/test_setup_skip_module.py | 9 | Base | def | class | test |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_setup_skip_module.py | testing/example_scripts/unittest/test_setup_skip_module.py | 10 | test | def | function | def test(self):
assert 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 7 | AsyncArguments | def | class | test_teardowns |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 8 | asyncTearDown | def | function | async def asyncTearDown(self):
teardowns.append(None)
async def test_something_async(self):
async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 4)
async def test_something_async_fails(self):
async def addition(x, y):
return... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 11 | test_something_async | def | function | async def test_something_async(self):
async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 4)
async def test_something_async_fails(self):
async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 3)
def ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 12 | addition | def | function | async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 4)
async def test_something_async_fails(self):
async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 3)
def test_teardowns(self):
assert len(t... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 15 | assertEqual | ref | function | self.assertEqual(await addition(2, 2), 4)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 15 | addition | ref | function | self.assertEqual(await addition(2, 2), 4)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 17 | test_something_async_fails | def | function | async def test_something_async_fails(self):
async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 3)
def test_teardowns(self):
assert len(teardowns) == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 18 | addition | def | function | async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 4)
async def test_something_async_fails(self):
async def addition(x, y):
return x + y
self.assertEqual(await addition(2, 2), 3)
def test_teardowns(self):
assert len(t... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 21 | assertEqual | ref | function | self.assertEqual(await addition(2, 2), 3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 21 | addition | ref | function | self.assertEqual(await addition(2, 2), 3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asyncio.py | testing/example_scripts/unittest/test_unittest_asyncio.py | 23 | test_teardowns | def | function | def test_teardowns(self):
assert len(teardowns) == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asynctest.py | testing/example_scripts/unittest/test_unittest_asynctest.py | 10 | Test | def | class | test_teardowns |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asynctest.py | testing/example_scripts/unittest/test_unittest_asynctest.py | 11 | tearDown | def | function | async def tearDown(self):
teardowns.append(None)
async def test_error(self):
await asyncio.sleep(0)
self.fail("failing on purpose")
async def test_ok(self):
await asyncio.sleep(0)
def test_teardowns(self):
assert len(teardowns) == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asynctest.py | testing/example_scripts/unittest/test_unittest_asynctest.py | 14 | test_error | def | function | async def test_error(self):
await asyncio.sleep(0)
self.fail("failing on purpose")
async def test_ok(self):
await asyncio.sleep(0)
def test_teardowns(self):
assert len(teardowns) == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asynctest.py | testing/example_scripts/unittest/test_unittest_asynctest.py | 16 | fail | ref | function | self.fail("failing on purpose")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asynctest.py | testing/example_scripts/unittest/test_unittest_asynctest.py | 18 | test_ok | def | function | async def test_ok(self):
await asyncio.sleep(0)
def test_teardowns(self):
assert len(teardowns) == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_asynctest.py | testing/example_scripts/unittest/test_unittest_asynctest.py | 21 | test_teardowns | def | function | def test_teardowns(self):
assert len(teardowns) == 2
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | 3 | Test | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | 4 | test_foo | def | function | async def test_foo(self):
assert _False
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | unittest | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | Test | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | unittest | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | TestCase | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | test_foo | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | self | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/unittest/test_unittest_plain_async.py | testing/example_scripts/unittest/test_unittest_plain_async.py | -1 | _False | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 5 | func | def | function | def func(msg):
warnings.warn(UserWarning(msg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 6 | warn | ref | function | warnings.warn(UserWarning(msg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 9 | parametrize | ref | function | @pytest.mark.parametrize("i", range(5))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 10 | test_foo | def | function | def test_foo(i):
func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 11 | func | ref | function | func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 14 | test_foo_1 | def | function | def test_foo_1():
func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 15 | func | ref | function | func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 18 | parametrize | ref | function | @pytest.mark.parametrize("i", range(5))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 19 | test_bar | def | function | def test_bar(i):
func("bar")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message.py | testing/example_scripts/warnings/test_group_warnings_by_message.py | 20 | func | ref | function | func("bar")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 5 | func | def | function | def func(msg):
warnings.warn(UserWarning(msg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 6 | warn | ref | function | warnings.warn(UserWarning(msg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 9 | parametrize | ref | function | @pytest.mark.parametrize("i", range(20))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 10 | test_foo | def | function | def test_foo(i):
func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 11 | func | ref | function | func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 14 | test_foo_1 | def | function | def test_foo_1():
func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 15 | func | ref | function | func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 18 | parametrize | ref | function | @pytest.mark.parametrize("i", range(20))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 19 | test_bar | def | function | def test_bar(i):
func("bar")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_1.py | 20 | func | ref | function | func("bar")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_2.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_2.py | 3 | test_2 | def | function | def test_2():
func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_2.py | testing/example_scripts/warnings/test_group_warnings_by_message_summary/test_2.py | 4 | func | ref | function | func("foo")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/examples/test_issue519.py | testing/examples/test_issue519.py | 3 | test_519 | def | function | def test_519(pytester: Pytester) -> None:
pytester.copy_example("issue_519.py")
res = pytester.runpytest("issue_519.py")
res.assert_outcomes(passed=8)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/examples/test_issue519.py | testing/examples/test_issue519.py | 4 | copy_example | ref | function | pytester.copy_example("issue_519.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/examples/test_issue519.py | testing/examples/test_issue519.py | 5 | runpytest | ref | function | res = pytester.runpytest("issue_519.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/examples/test_issue519.py | testing/examples/test_issue519.py | 6 | assert_outcomes | ref | function | res.assert_outcomes(passed=8)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/freeze/create_executable.py | testing/freeze/create_executable.py | 6 | freeze_includes | ref | function | for x in pytest.freeze_includes():
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/freeze/runtests_script.py | testing/freeze/runtests_script.py | 9 | main | ref | function | sys.exit(pytest.main())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/freeze/tests/test_trivial.py | testing/freeze/tests/test_trivial.py | 0 | test_upper | def | function | def test_upper():
assert "foo".upper() == "FOO"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/freeze/tests/test_trivial.py | testing/freeze/tests/test_trivial.py | 4 | test_lower | def | function | def test_lower():
assert "FOO".lower() == "foo"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 6 | test_simple_repr | def | function | def test_simple_repr():
assert saferepr(1) == "1"
assert saferepr(None) == "None"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 7 | saferepr | ref | function | assert saferepr(1) == "1"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 8 | saferepr | ref | function | assert saferepr(None) == "None"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 11 | test_maxsize | def | function | def test_maxsize():
s = saferepr("x" * 50, maxsize=25)
assert len(s) == 25
expected = repr("x" * 10 + "..." + "x" * 10)
assert s == expected
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 12 | saferepr | ref | function | s = saferepr("x" * 50, maxsize=25)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 18 | test_no_maxsize | def | function | def test_no_maxsize():
text = "x" * DEFAULT_REPR_MAX_SIZE * 10
s = saferepr(text, maxsize=None)
expected = repr(text)
assert s == expected
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 20 | saferepr | ref | function | s = saferepr(text, maxsize=None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 25 | test_maxsize_error_on_instance | def | function | def test_maxsize_error_on_instance():
class A:
def __repr__(self):
raise ValueError("...")
s = saferepr(("*" * 50, A()), maxsize=25)
assert len(s) == 25
assert s[0] == "(" and s[-1] == ")"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/io/test_saferepr.py | testing/io/test_saferepr.py | 26 | A | def | class | __repr__ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.