repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_order_sort_valid_key
assert
numeric_literal
11
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.utils def test_order_sort_valid_key(): item = dict(order=1) assert charts_builder.order_sort(item) ==
1
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_order_shuffled_sort_multiple_valid_key
assert
variable
15
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.utils def test_order_shuffled_sort_multiple_valid_key(): orders = list(range(0, 10)) shuffle(orders) modules = [dict(order=i, foo='bar') for i in orders] res = sorted(modules, key=charts_builder.order_sort...
i
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_order_sort_none
assert
numeric_literal
10
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.utils def test_order_sort_none(): assert charts_builder.order_sort(None) ==
-1
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_get_num_rows_none
assert
none_literal
10
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.utils def test_get_num_rows_none(): assert charts_builder.get_num_rows(None) is
None
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_order_shuffled_sort_multiple_valid_key_one_invalid_key
assert
complex_expr
21
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.utils def test_order_shuffled_sort_multiple_valid_key_one_invalid_key(): orders = list(range(0, 10)) shuffle(orders) modules = [dict(order=i, foo='bar') for i in orders] # Add one w/o order key. module...
i - 1
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_order_shuffled_sort_multiple_valid_key_one_invalid_key
assert
complex_expr
17
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.utils def test_order_shuffled_sort_multiple_valid_key_one_invalid_key(): orders = list(range(0, 10)) shuffle(orders) modules = [dict(order=i, foo='bar') for i in orders] # Add one w/o order key. module...
res[0]
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_get_active_assets
assert
variable
12
from random import shuffle import pytest from flask_jsondash import charts_builder def test_get_active_assets(): all_res = charts_builder.get_all_assets() families = ['D3'] active_res = charts_builder.get_active_assets(families) assert all_res !=
active_res
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
christabor/flask_jsondash
37c9df6ad548d7169f77333704e27f382a9e48d5
67
train
train
tests/test_utils.py
test_is_consecutive_rows_invalid_no_row_zero_allowed
pytest.raises
variable
15
from random import shuffle import pytest from flask_jsondash import charts_builder @pytest.mark.schema @pytest.mark.parametrize('lst', [ [1, 0, 2], [0, 1], [1, 0], ]) def test_is_consecutive_rows_invalid_no_row_zero_allowed(lst): with pytest.raises(
AssertionError)
37c9df6ad548d7169f77333704e27f382a9e48d5
67
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_direc.py
test_opposite
assert
complex_expr
6
from snake.base import Direc def test_opposite(): assert Direc.opposite(Direc.UP) == Direc.DOWN assert Direc.opposite(Direc.DOWN) ==
Direc.UP
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_direc.py
test_opposite
assert
complex_expr
5
from snake.base import Direc def test_opposite(): assert Direc.opposite(Direc.UP) ==
Direc.DOWN
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_direc.py
test_opposite
assert
complex_expr
8
from snake.base import Direc def test_opposite(): assert Direc.opposite(Direc.UP) == Direc.DOWN assert Direc.opposite(Direc.DOWN) == Direc.UP assert Direc.opposite(Direc.LEFT) == Direc.RIGHT assert Direc.opposite(Direc.RIGHT) ==
Direc.LEFT
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_direc.py
test_opposite
assert
complex_expr
7
from snake.base import Direc def test_opposite(): assert Direc.opposite(Direc.UP) == Direc.DOWN assert Direc.opposite(Direc.DOWN) == Direc.UP assert Direc.opposite(Direc.LEFT) ==
Direc.RIGHT
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_copy
assert
func_call
10
import pytest from snake.base import Map, PointType, Pos def test_copy(): m = Map(5, 5) m.point(Pos(1, 1)).type = PointType.FOOD m_copy = m.copy() assert id(m) !=
id(m_copy)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_init
pytest.raises
variable
7
import pytest from snake.base import Map, PointType, Pos def test_init(): with pytest.raises(
TypeError)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_init
pytest.raises
variable
9
import pytest from snake.base import Map, PointType, Pos def test_init(): with pytest.raises(TypeError): m = Map(5, 1.5) with pytest.raises(
ValueError)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_food
assert
complex_expr
15
import pytest from snake.base import Map, PointType, Pos def test_food(): m = Map(5, 5) assert not m.has_food() m.create_food(Pos(1, 1)) assert m.has_food() m.rm_food() assert not m.has_food() food = m.create_rand_food() assert m.has_food() assert m.point(food).type ==
PointType.FOOD
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_init
assert
complex_expr
15
import pytest from snake.base import Map, PointType, Pos def test_init(): with pytest.raises(TypeError): m = Map(5, 1.5) with pytest.raises(ValueError): m = Map(4, 5) m = Map(12, 12) for i in range(m.num_rows): for j in range(m.num_cols): if i == 0 or i == m.num_row...
PointType.WALL
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_copy
assert
complex_expr
11
import pytest from snake.base import Map, PointType, Pos def test_copy(): m = Map(5, 5) m.point(Pos(1, 1)).type = PointType.FOOD m_copy = m.copy() assert id(m) != id(m_copy) assert m.num_rows ==
m_copy.num_rows
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_copy
assert
complex_expr
12
import pytest from snake.base import Map, PointType, Pos def test_copy(): m = Map(5, 5) m.point(Pos(1, 1)).type = PointType.FOOD m_copy = m.copy() assert id(m) != id(m_copy) assert m.num_rows == m_copy.num_rows assert m.num_cols ==
m_copy.num_cols
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_copy
assert
complex_expr
13
import pytest from snake.base import Map, PointType, Pos def test_copy(): m = Map(5, 5) m.point(Pos(1, 1)).type = PointType.FOOD m_copy = m.copy() assert id(m) != id(m_copy) assert m.num_rows == m_copy.num_rows assert m.num_cols == m_copy.num_cols assert m.capacity ==
m_copy.capacity
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_food
assert
complex_expr
19
import pytest from snake.base import Map, PointType, Pos def test_food(): m = Map(5, 5) assert not m.has_food() m.create_food(Pos(1, 1)) assert m.has_food() m.rm_food() assert not m.has_food() food = m.create_rand_food() assert m.has_food() assert m.point(food).type == PointType.FO...
PointType.EMPTY
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_map.py
test_copy
assert
func_call
16
import pytest from snake.base import Map, PointType, Pos def test_copy(): m = Map(5, 5) m.point(Pos(1, 1)).type = PointType.FOOD m_copy = m.copy() assert id(m) != id(m_copy) assert m.num_rows == m_copy.num_rows assert m.num_cols == m_copy.num_cols assert m.capacity == m_copy.capacity f...
m_copy.point(Pos(i, j)).type
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_point.py
test_init
assert
complex_expr
8
from snake.base import Point, PointType def test_init(): p = Point() assert p.type == PointType.EMPTY p.type = PointType.FOOD assert p.type ==
PointType.FOOD
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_point.py
test_init
assert
complex_expr
6
from snake.base import Point, PointType def test_init(): p = Point() assert p.type ==
PointType.EMPTY
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_adj
assert
numeric_literal
7
from snake.base import Direc, Pos def test_adj(): p = Pos(0, 0) adjs = p.all_adj() assert len(adjs) ==
4
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_adj
assert
numeric_literal
25
from snake.base import Direc, Pos def test_adj(): p = Pos(0, 0) adjs = p.all_adj() assert len(adjs) == 4 hit = [False] * 4 assert hit.count(False) == 4 for adj in adjs: if adj == Pos(-1, 0): assert p.direc_to(adj) == Direc.UP hit[0] = True elif adj == Pos...
0
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_arithmetic
assert
variable
11
from snake.base import Direc, Pos def test_arithmetic(): p1 = Pos(-5, 10) p2 = Pos(5, -10) p3 = p1 + p2 p4 = p1 - p2 p5 = p2 - p1 assert p3 == Pos(0, 0) assert p3 - p1 ==
p2
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_arithmetic
assert
variable
12
from snake.base import Direc, Pos def test_arithmetic(): p1 = Pos(-5, 10) p2 = Pos(5, -10) p3 = p1 + p2 p4 = p1 - p2 p5 = p2 - p1 assert p3 == Pos(0, 0) assert p3 - p1 == p2 assert p3 - p2 ==
p1
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_dist
assert
numeric_literal
7
from snake.base import Direc, Pos def test_dist(): p1 = Pos(-5, 20) p2 = Pos(10, 8) assert Pos.manhattan_dist(p1, p2) ==
27
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_adj
assert
complex_expr
12
from snake.base import Direc, Pos def test_adj(): p = Pos(0, 0) adjs = p.all_adj() assert len(adjs) == 4 hit = [False] * 4 assert hit.count(False) == 4 for adj in adjs: if adj == Pos(-1, 0): assert p.direc_to(adj) ==
Direc.UP
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_arithmetic
assert
func_call
10
from snake.base import Direc, Pos def test_arithmetic(): p1 = Pos(-5, 10) p2 = Pos(5, -10) p3 = p1 + p2 p4 = p1 - p2 p5 = p2 - p1 assert p3 ==
Pos(0, 0)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_init
assert
func_call
6
from snake.base import Direc, Pos def test_init(): p = Pos(-5, 5) assert p ==
Pos(-5, 5)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_adj
assert
complex_expr
15
from snake.base import Direc, Pos def test_adj(): p = Pos(0, 0) adjs = p.all_adj() assert len(adjs) == 4 hit = [False] * 4 assert hit.count(False) == 4 for adj in adjs: if adj == Pos(-1, 0): assert p.direc_to(adj) == Direc.UP hit[0] = True elif adj == Pos...
Direc.DOWN
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_pos.py
test_init
assert
func_call
10
from snake.base import Direc, Pos def test_init(): p = Pos(-5, 5) assert p == Pos(-5, 5) p.x = -10 p.y = 10 assert p != Pos(-5, 5) assert p ==
Pos(-10, 10)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_init
assert
numeric_literal
14
from snake.base import Direc, Map, PointType, Pos, Snake def test_init(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) assert not s.dead assert s.direc is Direc.RIGHT as...
3
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_move_eat
assert
numeric_literal
9
from snake.base import Direc, Map, PointType, Pos, Snake def test_move_eat(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR] ) assert s.len() ==
2
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_init
assert
func_call
15
from snake.base import Direc, Map, PointType, Pos, Snake def test_init(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) assert not s.dead assert s.direc is Direc.RIGHT ass...
Pos(1, 3)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_init
assert
func_call
16
from snake.base import Direc, Map, PointType, Pos, Snake def test_init(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) assert not s.dead assert s.direc is Direc.RIGHT ass...
Pos(1, 2)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_init
assert
func_call
17
from snake.base import Direc, Map, PointType, Pos, Snake def test_init(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) assert not s.dead assert s.direc is Direc.RIGHT ass...
Pos(1, 1)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_copy
assert
func_call
15
from snake.base import Direc, Map, PointType, Pos, Snake def test_copy(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) s.move(Direc.DOWN) s.move(Direc.LEFT) s_copy, _ = s...
id(s_copy)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_init
assert
complex_expr
13
from snake.base import Direc, Map, PointType, Pos, Snake def test_init(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) assert not s.dead assert s.direc is
Direc.RIGHT
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_move_eat
assert
complex_expr
17
from snake.base import Direc, Map, PointType, Pos, Snake def test_move_eat(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR] ) assert s.len() == 2 m.create_food(Pos(1, 3)) assert m.has_food() s.move(Direc.RIGHT) assert not...
PointType.HEAD_R
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_move_eat
assert
complex_expr
22
from snake.base import Direc, Map, PointType, Pos, Snake def test_move_eat(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR] ) assert s.len() == 2 m.create_food(Pos(1, 3)) assert m.has_food() s.move(Direc.RIGHT) assert not...
PointType.HEAD_D
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_move_eat
assert
complex_expr
27
from snake.base import Direc, Map, PointType, Pos, Snake def test_move_eat(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR] ) assert s.len() == 2 m.create_food(Pos(1, 3)) assert m.has_food() s.move(Direc.RIGHT) assert not...
PointType.HEAD_L
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/base/test_snake.py
test_copy
assert
complex_expr
21
from snake.base import Direc, Map, PointType, Pos, Snake def test_copy(): m = Map(5, 5) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ) s.move(Direc.DOWN) s.move(Direc.LEFT) s_copy, _ = s...
s_copy.bodies[i]
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_hamilton.py
test_cycle
assert
complex_expr
21
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import HamiltonSolver def test_cycle(): m = Map(6, 6) s = Snake( m, Direc.RIGHT, [Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR] ) solver = HamiltonSolver(s, False) table = solver.table cnt = 0 ...
m.capacity
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_hamilton.py
test_cycle
assert
complex_expr
16
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import HamiltonSolver def test_cycle(): m = Map(6, 6) s = Snake( m, Direc.RIGHT, [Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR] ) solver = HamiltonSolver(s, False) table = solver.table cnt = 0 ...
table[head.x][head.y].idx
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_path.py
test_shortest
assert
numeric_literal
21
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import PathSolver def test_shortest(): m = Map(7, 7) m.create_food(Pos(5, 5)) s = Snake( m, Direc.RIGHT, [Pos(2, 3), Pos(2, 2), Pos(2, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ...
5
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_path.py
test_shortest
assert
complex_expr
20
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import PathSolver def test_shortest(): m = Map(7, 7) m.create_food(Pos(5, 5)) s = Snake( m, Direc.RIGHT, [Pos(2, 3), Pos(2, 2), Pos(2, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ...
expect_path[i]
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_path.py
test_shortest
assert
func_call
18
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import PathSolver def test_shortest(): m = Map(7, 7) m.create_food(Pos(5, 5)) s = Snake( m, Direc.RIGHT, [Pos(2, 3), Pos(2, 2), Pos(2, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ...
len(expect_path)
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_path.py
test_longest
assert
complex_expr
33
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import PathSolver def test_longest(): m = Map(6, 6) m.create_food(Pos(4, 4)) s = Snake( m, Direc.RIGHT, [Pos(1, 3), Pos(1, 2), Pos(1, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ...
PointType.BODY_HOR
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/solver/test_path.py
test_shortest
assert
complex_expr
22
from snake.base import Direc, Map, PointType, Pos, Snake from snake.solver import PathSolver def test_shortest(): m = Map(7, 7) m.create_food(Pos(5, 5)) s = Snake( m, Direc.RIGHT, [Pos(2, 3), Pos(2, 2), Pos(2, 1)], [PointType.HEAD_R, PointType.BODY_HOR, PointType.BODY_HOR], ...
solver.table[5][5].dist
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/util/test_sumtree.py
test_sumtree
assert
numeric_literal
24
import numpy as np import pytest from snake.util.sumtree import SumTree def test_sumtree(): tree = SumTree(8) data = ( ("a", 3), ("b", 10), ("c", 12), ("d", 4), ("e", 1), ("f", 2), ("g", 8), ("h", 2), ) for dat in data: tree.inser...
1
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/util/test_sumtree.py
test_sumtree
assert
numeric_literal
62
import numpy as np import pytest from snake.util.sumtree import SumTree def test_sumtree(): tree = SumTree(8) data = ( ("a", 3), ("b", 10), ("c", 12), ("d", 4), ("e", 1), ("f", 2), ("g", 8), ("h", 2), ) for dat in data: tree.inser...
2
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/util/test_sumtree.py
test_sumtree
assert
numeric_literal
22
import numpy as np import pytest from snake.util.sumtree import SumTree def test_sumtree(): tree = SumTree(8) data = ( ("a", 3), ("b", 10), ("c", 12), ("d", 4), ("e", 1), ("f", 2), ("g", 8), ("h", 2), ) for dat in data: tree.inser...
42
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/util/test_sumtree.py
test_sumtree
assert
numeric_literal
23
import numpy as np import pytest from snake.util.sumtree import SumTree def test_sumtree(): tree = SumTree(8) data = ( ("a", 3), ("b", 10), ("c", 12), ("d", 4), ("e", 1), ("f", 2), ("g", 8), ("h", 2), ) for dat in data: tree.inser...
12
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
chuyangliu/snake
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
train
train
tests/util/test_sumtree.py
test_sumtree
assert
numeric_literal
61
import numpy as np import pytest from snake.util.sumtree import SumTree def test_sumtree(): tree = SumTree(8) data = ( ("a", 3), ("b", 10), ("c", 12), ("d", 4), ("e", 1), ("f", 2), ("g", 8), ("h", 2), ) for dat in data: tree.inser...
20
ec8a1e13b2851b4203d39299ab88e3a469e3d14a
0
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_git_host_agnostic.py
test_parse_query_without_host
assert
variable
65
from typing import List, Tuple import pytest from gitingest.query_parsing import parse_query from gitingest.utils.query_parser_utils import KNOWN_GIT_HOSTS _REPOS: List[Tuple[str, str, str]] = [ ("github.com", "tiangolo", "fastapi"), ("gitlab.com", "gitlab-org", "gitlab-runner"), ("bitbucket.org", "na-dn...
expected
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_git_host_agnostic.py
test_parse_query_without_host
pytest.raises
variable
43
from typing import List, Tuple import pytest from gitingest.query_parsing import parse_query from gitingest.utils.query_parser_utils import KNOWN_GIT_HOSTS _REPOS: List[Tuple[str, str, str]] = [ ("github.com", "tiangolo", "fastapi"), ("gitlab.com", "gitlab-org", "gitlab-runner"), ("bitbucket.org", "na-dn...
ValueError)
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_url_valid_https
assert
variable
34
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
url
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_query_empty_patterns
assert
none_literal
39
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
None
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_query_with_large_file_size
assert
complex_expr
39
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
10**9
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_query_basic
assert
string_literal
40
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
"user"
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_query_basic
assert
string_literal
41
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
"repo"
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_url_with_subpaths
assert
string_literal
45
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
"main"
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/query_parser/test_query_parser.py
test_parse_query_with_branch
assert
string_literal
48
from pathlib import Path from typing import Callable, List, Optional from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.query_parsing import _parse_patterns, _parse_remote_repo, parse_query from gitingest.schemas.ingestion_schema import IngestionQuery from gitingest...
"blob"
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_cli.py
test_cli_writes_file
assert
numeric_literal
42
import os from inspect import signature from pathlib import Path from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner, Result from gitingest.cli import main from gitingest.config import MAX_FILE_SIZE, OUTPUT_FILE_NAME @pytest.mark.parametrize( "cli...
0
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_cli.py
test_cli_writes_file
assert
variable
50
import os from inspect import signature from pathlib import Path from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner, Result from gitingest.cli import main from gitingest.config import MAX_FILE_SIZE, OUTPUT_FILE_NAME @pytest.mark.parametrize( "cli...
expect_file
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_cli.py
test_cli_writes_file
assert
variable
46
import os from inspect import signature from pathlib import Path from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner, Result from gitingest.cli import main from gitingest.config import MAX_FILE_SIZE, OUTPUT_FILE_NAME @pytest.mark.parametrize( "cli...
stdout_lines
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_cli.py
test_cli_with_stdout_output
assert
variable
36
import os from inspect import signature from pathlib import Path from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner, Result from gitingest.cli import main from gitingest.config import MAX_FILE_SIZE, OUTPUT_FILE_NAME def test_cli_with_stdout_output() ...
stderr_lines
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_cli.py
test_cli_with_stdout_output
assert
complex_expr
25
import os from inspect import signature from pathlib import Path from typing import List import pytest from _pytest.monkeypatch import MonkeyPatch from click.testing import CliRunner, Result from gitingest.cli import main from gitingest.config import MAX_FILE_SIZE, OUTPUT_FILE_NAME def test_cli_with_stdout_output() ...
result.stdout
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_flow_integration.py
test_remote_repository_analysis
assert
numeric_literal
52
import shutil from concurrent.futures import ThreadPoolExecutor from pathlib import Path from typing import Generator import pytest from fastapi.testclient import TestClient from pytest import FixtureRequest from pytest_mock import MockerFixture from src.server.main import app BASE_DIR = Path(__file__).resolve().par...
200
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_flow_integration.py
test_remote_repository_analysis
assert
complex_expr
53
import shutil from concurrent.futures import ThreadPoolExecutor from pathlib import Path from typing import Generator import pytest from fastapi.testclient import TestClient from pytest import FixtureRequest from pytest_mock import MockerFixture from src.server.main import app BASE_DIR = Path(__file__).resolve().par...
response.text
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_create_git_command_with_ghe_urls
assert
variable
58
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "base_cmd, local_path, url, token, expected_auth_hostn...
cmd
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_create_git_command_helper_calls
assert_*
variable
31
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "url, token, should_call", [ ("https://git...
token)
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_create_git_auth_header
assert
variable
26
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "token", [ "ghp_abcdefghijklmnopqrstuvwxyz...
expected
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_create_git_command_with_ghe_urls
assert
variable
63
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "base_cmd, local_path, url, token, expected_auth_hostn...
auth_header
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_create_git_command
assert
variable
49
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "base_cmd, local_path, url, token, expected_suffix", ...
expected_prefix
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_create_git_command
assert
variable
52
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "base_cmd, local_path, url, token, expected_suffix", ...
expected_suffix
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_git_utils.py
test_validate_github_token_invalid
pytest.raises
variable
26
import base64 import pytest from gitingest.utils.exceptions import InvalidGitHubTokenError from gitingest.utils.git_utils import ( _is_github_host, create_git_auth_header, create_git_command, validate_github_token, ) @pytest.mark.parametrize( "token", [ "github_pat_short", # Too shor...
InvalidGitHubTokenError)
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_gitignore_feature.py
test_load_gitignore_patterns
assert
variable
41
from pathlib import Path import pytest from gitingest.entrypoint import ingest_async from gitingest.utils.ignore_patterns import load_gitignore_patterns def repo_fixture(tmp_path: Path) -> Path: """ Create a temporary repository structure with: - A .gitignore that excludes 'exclude.txt' - 'includ...
patterns
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_gitignore_feature.py
test_ingest_with_gitignore
assert
variable
41
from pathlib import Path import pytest from gitingest.entrypoint import ingest_async from gitingest.utils.ignore_patterns import load_gitignore_patterns def repo_fixture(tmp_path: Path) -> Path: """ Create a temporary repository structure with: - A .gitignore that excludes 'exclude.txt' - 'includ...
content_with_ignore
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_gitignore_feature.py
test_ingest_with_gitignore
assert
variable
48
from pathlib import Path import pytest from gitingest.entrypoint import ingest_async from gitingest.utils.ignore_patterns import load_gitignore_patterns def repo_fixture(tmp_path: Path) -> Path: """ Create a temporary repository structure with: - A .gitignore that excludes 'exclude.txt' - 'includ...
content_without_ignore
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_ingestion.py
test_include_ignore_patterns
assert
none_literal
169
import re from pathlib import Path from typing import Set, TypedDict import pytest from gitingest.ingestion import ingest_query from gitingest.query_parsing import IngestionQuery @pytest.mark.parametrize( "pattern_scenario", [ pytest.param( PatternScenario( { ...
None
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_ingestion.py
test_run_ingest_query
assert
variable
25
import re from pathlib import Path from typing import Set, TypedDict import pytest from gitingest.ingestion import ingest_query from gitingest.query_parsing import IngestionQuery def test_run_ingest_query(temp_directory: Path, sample_query: IngestionQuery) -> None: """ Test `ingest_query` to ensure it proces...
summary
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_ingestion.py
test_run_ingest_query
assert
variable
29
import re from pathlib import Path from typing import Set, TypedDict import pytest from gitingest.ingestion import ingest_query from gitingest.query_parsing import IngestionQuery def test_run_ingest_query(temp_directory: Path, sample_query: IngestionQuery) -> None: """ Test `ingest_query` to ensure it proces...
content
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_ingestion.py
test_include_ignore_patterns
assert
variable
178
import re from pathlib import Path from typing import Set, TypedDict import pytest from gitingest.ingestion import ingest_query from gitingest.query_parsing import IngestionQuery @pytest.mark.parametrize( "pattern_scenario", [ pytest.param( PatternScenario( { ...
structure
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_notebook_utils.py
test_process_notebook_all_cells
assert
numeric_literal
28
import pytest from gitingest.utils.notebook_utils import process_notebook from tests.conftest import WriteNotebookFunc def test_process_notebook_all_cells(write_notebook: WriteNotebookFunc) -> None: """ Test processing a notebook containing markdown, code, and raw cells. Given a notebook with: - On...
4
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_notebook_utils.py
test_process_notebook_empty_cells
assert
numeric_literal
26
import pytest from gitingest.utils.notebook_utils import process_notebook from tests.conftest import WriteNotebookFunc def test_process_notebook_empty_cells(write_notebook: WriteNotebookFunc) -> None: """ Test that cells with an empty 'source' are skipped. Given a notebook with 4 cells, 3 of which have e...
2
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_notebook_utils.py
test_process_notebook_all_cells
assert
variable
31
import pytest from gitingest.utils.notebook_utils import process_notebook from tests.conftest import WriteNotebookFunc def test_process_notebook_all_cells(write_notebook: WriteNotebookFunc) -> None: """ Test processing a notebook containing markdown, code, and raw cells. Given a notebook with: - On...
result
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_notebook_utils.py
test_process_notebook_multiple_worksheets
assert
variable
53
import pytest from gitingest.utils.notebook_utils import process_notebook from tests.conftest import WriteNotebookFunc def test_process_notebook_multiple_worksheets(write_notebook: WriteNotebookFunc) -> None: """ Test a notebook containing multiple 'worksheets'. Given a notebook with two worksheets: ...
result_multi
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_notebook_utils.py
test_process_notebook_multiple_worksheets
assert
variable
49
import pytest from gitingest.utils.notebook_utils import process_notebook from tests.conftest import WriteNotebookFunc def test_process_notebook_multiple_worksheets(write_notebook: WriteNotebookFunc) -> None: """ Test a notebook containing multiple 'worksheets'. Given a notebook with two worksheets: ...
result_single
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_clone_with_commit
assert
numeric_literal
37
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
2
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_clone_without_commit
assert
numeric_literal
32
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
1
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_clone_with_commit_and_subpath
assert
numeric_literal
63
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
3
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_check_repo_exists_with_redirect
assert
bool_literal
35
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
False
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_check_repo_exists
assert
variable
43
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
expected
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_clone_specific_branch
assert
variable
37
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
branch_name
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_clone_with_specific_subpath
assert_*
string_literal
44
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
"src/docs")
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor
coderamp-labs/gitingest
af95bae0878dc04222743dd63f2649b6fb707119
55
train
train
tests/test_repository_clone.py
test_clone_with_commit
assert_*
complex_expr
36
import asyncio import os from pathlib import Path from unittest.mock import AsyncMock import pytest from pytest_mock import MockerFixture from gitingest.cloning import clone_repo from gitingest.schemas import CloneConfig from gitingest.utils.exceptions import AsyncTimeoutError from gitingest.utils.git_utils import ch...
clone_config.url)
af95bae0878dc04222743dd63f2649b6fb707119
55
v2_extractor_at_anchor