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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_image_plot_lower.py | test | assert_* | string_literal | 27 | import matplotlib.pyplot as plt
from helpers import assert_equality
def plot():
from matplotlib import rcParams
import matplotlib.image as mpimg
import os
this_dir = os.path.dirname(os.path.realpath(__file__))
img = mpimg.imread(os.path.join(this_dir, "lena.png"))
dpi = rcParams["figure.dpi"... | "test_image_plot_lower_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_legend_best_location.py | test | assert_* | string_literal | 62 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
fig, ax = plt.subplots(3, 3, sharex="col", sharey="row")
axes = [ax[i][j] for i in range(len(ax)) for j in range(len(ax[i]))]
t = np.arange(0.0, 2.0 * np.pi, 0.4)
# Legend best location is "upper right"... | "test_legend_best_location_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_legend_columns.py | test | assert_* | string_literal | 15 | from helpers import assert_equality
def plot():
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(17, 6))
ax.plot(np.array([1, 5]), label="Test 1")
ax.plot(np.array([5, 1]), label="Test 2")
ax.legend(ncol=2, loc="upper center")
return fig
def test():
... | "test_legend_columns_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_legend_labels.py | test | assert_* | string_literal | 23 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
fig = plt.figure()
x = np.ma.arange(0, 2 * np.pi, 0.4)
y1 = np.sin(1 * x)
y2 = np.sin(2 * x)
y3 = np.sin(3 * x)
plt.plot(x, y1, label="y1")
plt.plot(x, y2, label=None)
plt.... | "test_legend_labels_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_legend_line_scatter.py | test | assert_* | complex_expr | 18 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
fig = plt.figure()
t = np.arange(5)
np.random.seed(123)
x = t
plt.plot(t, x, label="line")
plt.scatter(t, x, label="scatter")
plt.legend()
return fig
def test():
assert_equality(plo... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_legends.py | test | assert_* | complex_expr | 27 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
fig = plt.figure()
x = np.ma.arange(0, 2 * np.pi, 0.4)
y = np.ma.sin(x)
y1 = np.sin(2 * x)
y2 = np.sin(3 * x)
ym1 = np.ma.masked_where(y1 > 0.5, y1)
ym2 = np.ma.masked_where(y2 ... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_legends2.py | test | assert_* | complex_expr | 25 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
fig, ax = plt.subplots(3, 3, sharex="col", sharey="row")
axes = [ax[i][j] for i in range(len(ax)) for j in range(len(ax[i]))]
for k, loc in enumerate(range(2, 11)):
t1 = np.arange(0.0, 2... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_line_collection.py | test | assert_* | complex_expr | 51 | from helpers import assert_equality
def plot():
# Example from
# <http://matplotlib.org/examples/pylab_examples/line_collection2.html>
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.collections import LineCollection
fig = plt.figure()
# In order to efficiently plot man... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_line_color_marker.py | test | assert_* | complex_expr | 23 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
fig = plt.figure()
with plt.style.context("ggplot"):
t = np.arange(0.0, 2.0, 0.1)
s = np.sin(2 * np.pi * t)
s2 = np.cos(2 * np.pi * t)
plt.plot(t, s, ".-", lw=1.5, co... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_line_dashes.py | test | assert_* | complex_expr | 14 | import matplotlib.pyplot as plt
from helpers import assert_equality
def plot():
fig = plt.figure()
linestyles = ["-", "--", "-.", ":", (0, (10, 1)), (5, (10, 1)), (0, (1, 2, 3, 4))]
for idx, ls in enumerate(linestyles):
plt.plot([idx, idx + 1], linestyle=ls)
return fig
def test():
assert... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_line_set_data.py | test | assert_* | string_literal | 13 | import matplotlib.pyplot as plt
from helpers import assert_equality
def plot():
fig = plt.figure()
line = plt.plot(0, 0, "kx")[0]
line.set_data(0, 0)
return fig
def test():
assert_equality(plot, | "test_line_set_data_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_loglogplot.py | test | assert_* | complex_expr | 14 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
fig = plt.figure()
x = np.logspace(0, 6, num=5)
plt.loglog(x, x ** 2, lw=2.1)
return fig
def test():
assert_equality(plot, | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_logplot.py | test | assert_* | complex_expr | 17 | import matplotlib.pyplot as plt
from helpers import assert_equality
def plot():
a = [pow(10, i) for i in range(10)]
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.semilogy(a, color="blue", lw=0.25)
plt.grid(b=True, which="major", color="g", linestyle="-", linewidth=0.25)
plt.grid(b=True,... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_logplot_base.py | test | assert_* | complex_expr | 17 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
a = [pow(10, i) for i in range(10)]
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.semilogy(a, color="blue", lw=0.25, basey=2)
plt.grid(b=True, which="major", color="g", linestyle="-", linewidth=0.25)
... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_marker.py | test | assert_* | complex_expr | 25 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
fig, ax = plt.subplots()
with plt.style.context("ggplot"):
t = np.linspace(0, 2 * np.pi, 11)
s = np.sin(t)
c = np.cos(t)
s2 = np.sin(2 * t)
ax.plot(t, s, "ko-", mec="r", m... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_noise.py | test | assert_* | complex_expr | 25 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
# Make plot with vertical (default) colorbar
fig = plt.figure()
ax = fig.add_subplot(111)
np.random.seed(123)
data = np.clip(np.random.randn(250, 250), -1, 1)
cax = ax.imshow(data, interpolatio... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_noise2.py | test | assert_* | complex_expr | 25 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
# Make plot with horizontal colorbar
fig = plt.figure()
ax = fig.add_subplot(111)
np.random.seed(123)
data = np.clip(np.random.randn(250, 250), -1, 1)
cax = ax.imshow(data, interpolation="neare... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_pandas_dataframe.py | test | assert_* | complex_expr | 14 | import matplotlib.pyplot as plt
import pandas as pd
from helpers import assert_equality
def plot():
fig = plt.figure(1, figsize=(8, 5))
df = pd.DataFrame(index=["one", "two", "three"], data={"data": [1, 2, 3]})
plt.plot(df, "o")
return fig
def test():
assert_equality(plot, | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_patch_styles.py | test | assert_* | complex_expr | 22 | import matplotlib.pyplot as plt
from matplotlib.collections import PolyCollection
from helpers import assert_equality
def plot():
fig = plt.figure()
axis = fig.add_subplot(1, 1, 1)
col = PolyCollection(
[], facecolors="none", edgecolors="red", linestyle="--", linewidth=1.2
)
col.set_zorde... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_patches.py | test | assert_* | complex_expr | 85 | from helpers import assert_equality
def plot():
from matplotlib.patches import (
Circle,
Ellipse,
Polygon,
Rectangle,
Wedge,
FancyArrowPatch,
)
from matplotlib.collections import PatchCollection
from matplotlib.path import Path
from matplotlib import ... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_quadmesh.py | test | assert_* | complex_expr | 35 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
x = np.linspace(0 * np.pi, 2 * np.pi, 128)
y = np.linspace(0 * np.pi, 2 * np.pi, 128)
X, Y = np.meshgrid(x, y)
nu = 1e-5
def F(t):
return np.exp(-2 * nu * t)
def u(x, y, t)... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_scatter.py | test | assert_* | complex_expr | 18 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
fig = plt.figure()
with plt.style.context("fivethirtyeight"):
np.random.seed(123)
plt.scatter(
np.linspace(0, 100, 101),
np.linspace(0, 100, 101) + 15 * np.ra... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_scatter_colormap.py | test | assert_* | complex_expr | 19 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
fig = plt.figure()
np.random.seed(123)
plt.scatter(
np.random.randn(10),
np.random.randn(10),
np.random.rand(10) * 90 + 10,
np.random.randn(10),
)
return ... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_sharex_and_y.py | test | assert_* | complex_expr | 18 | import matplotlib.pyplot as plt
import numpy as np
from helpers import assert_equality
def plot():
fig, axes = plt.subplots(2, 2, sharex=True, sharey=True, figsize=(8, 5))
t = np.arange(0.0, 5.0, 0.1)
s = np.cos(2 * np.pi * t)
axes[0][0].plot(t, s, color="blue")
axes[0][1].plot(t, s, color="red")
... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_steps.py | test | assert_* | complex_expr | 26 | from helpers import assert_equality
def plot():
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
x = np.arange(5)
y1 = np.array([1, 2, 1, 4, 2])
y2 = np.array([1, 2, 1, 4, 2])
y3 = np.array([1, 2, 1, 4, 2])
y4 = np.array([1, 2, 1, 4, 2])
y5 = np.array([2, 3, 2,... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_subplot4x4.py | test | assert_* | complex_expr | 37 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as pp
import numpy as np
fig = pp.figure()
an = np.linspace(0, 2 * np.pi, 10)
pp.subplot(221)
pp.plot(3 * np.cos(an), 3 * np.sin(an))
pp.title("not equal, looks like ellipse", fontsize=10)
pp.subplot(222)
... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_subplots.py | test | assert_* | complex_expr | 36 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
import numpy as np
def f(t):
s1 = np.cos(2 * np.pi * t)
e1 = np.exp(-t)
return np.multiply(s1, e1)
fig = plt.figure()
t1 = np.arange(0.0, 5.0, 0.4)
t2 = np.arange(0.0, 5.0, 0.1)
t... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_text_overlay.py | test | assert_* | complex_expr | 116 | import matplotlib.pyplot as plt
import numpy
from helpers import assert_equality
def plot():
fig = plt.figure()
xxx = numpy.linspace(0, 5)
yyy = xxx ** 2
plt.text(
1,
5,
"test1",
size=50,
rotation=30.0,
ha="center",
va="bottom",
color="r... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_tick_positions.py | test | assert_* | complex_expr | 95 | from helpers import assert_equality
def plot():
from matplotlib import pyplot as plt
x = [1, 2, 3, 4]
y = [1, 4, 9, 6]
fig = plt.figure()
ax = plt.subplot(4, 4, 1)
plt.plot(x, y, "ro")
plt.tick_params(axis="x", which="both", bottom="off", top="off")
plt.tick_params(axis="y", which="b... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
nschloe/tikzplotlib | c6509285f7bf8874958373acd82e6ecab362781a | 68 | train | train | test/test_viridis.py | test | assert_* | complex_expr | 19 | from helpers import assert_equality
def plot():
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
x, y = np.meshgrid(np.linspace(0, 1), np.linspace(0, 1))
z = x ** 2 - y ** 2
fig = plt.figure()
plt.pcolormesh(x, y, z, cmap=cm.viridis)
# plt.colorbar()
... | __file__[:-3] + "_reference.tex") | c6509285f7bf8874958373acd82e6ecab362781a | 68 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_setup.py | test_that_markup_filter_not_added_when_plugin_disabled | assert | numeric_literal | 39 | from terminal.pluglets.tile_grid.macro import TileGridMacroEnvironment
from unittest.mock import patch, MagicMock, PropertyMock
from tests.interface import theme_plugins
import pytest
def make_mkdocs_config_property_mocks(plugin_list=[]):
properties = {}
properties["plugins"] = PropertyMock(return_value=plugin... | 0 | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_setup.py | test_that_markup_filter_added_when_plugin_enabled | assert | numeric_literal | 53 | from terminal.pluglets.tile_grid.macro import TileGridMacroEnvironment
from unittest.mock import patch, MagicMock, PropertyMock
from tests.interface import theme_plugins
import pytest
def make_mkdocs_config_property_mocks(plugin_list=[]):
properties = {}
properties["plugins"] = PropertyMock(return_value=plugin... | 1 | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_setup.py | test_that_markup_filter_not_added_when_plugin_disabled | assert | none_literal | 34 | from terminal.pluglets.tile_grid.macro import TileGridMacroEnvironment
from unittest.mock import patch, MagicMock, PropertyMock
from tests.interface import theme_plugins
import pytest
def make_mkdocs_config_property_mocks(plugin_list=[]):
properties = {}
properties["plugins"] = PropertyMock(return_value=plugin... | None | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_setup.py | test_that_markup_filter_added_when_plugin_enabled | assert | complex_expr | 54 | from terminal.pluglets.tile_grid.macro import TileGridMacroEnvironment
from unittest.mock import patch, MagicMock, PropertyMock
from tests.interface import theme_plugins
import pytest
def make_mkdocs_config_property_mocks(plugin_list=[]):
properties = {}
properties["plugins"] = PropertyMock(return_value=plugin... | filter_list[0]["name"] | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_user_interface.py | test_usage_message_when_bad_input | assert | variable | 33 | from terminal.pluglets.tile_grid.util import tile_grid
from tests.utils.html import assert_valid_html
from tests.interface import theme_pluglets
from unittest.mock import patch
import pytest
def grid_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-pa... | pluglet_output | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_user_interface.py | test_usage_message_when_bad_input | assert_* | variable | 35 | from terminal.pluglets.tile_grid.util import tile_grid
from tests.utils.html import assert_valid_html
from tests.interface import theme_pluglets
from unittest.mock import patch
import pytest
def grid_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-pa... | pluglet_output) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/pluglets/tile_grid/test_pluglet_user_interface.py | test_pluglet_renders_grid_with_one_tile | assert_* | string_literal | 25 | from terminal.pluglets.tile_grid.util import tile_grid
from tests.utils.html import assert_valid_html
from tests.interface import theme_pluglets
from unittest.mock import patch
import pytest
def grid_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-pa... | "pluglets/tile_grid/templates/j2-partials/tiles.html") | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/search/test_search.py | test_no_search_button_when_search_plugin_disabled | assert | string_literal | 37 | from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
from tests.interface import theme_features, theme_plugins
import pytest
def enabled_context():
nav_list = []
return {
"nav": nav_list,
"config": {
"site_name": "site_name_placeholder",
"site_url": "site... | "" | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/search/test_search.py | test_search_button_included_when_search_plugin_enabled | assert_* | variable | 30 | from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
from tests.interface import theme_features, theme_plugins
import pytest
def enabled_context():
nav_list = []
return {
"nav": nav_list,
"config": {
"site_name": "site_name_placeholder",
"site_url": "site... | ALLOW_EMPTY_ELEMENTS) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/search/test_search.py | test_search_button_included_when_search_plugin_enabled | assert | variable | 29 | from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
from tests.interface import theme_features, theme_plugins
import pytest
def enabled_context():
nav_list = []
return {
"nav": nav_list,
"config": {
"site_name": "site_name_placeholder",
"site_url": "site... | rendered_nav_search_button | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/side_panel/test_side_panel.py | test_no_panel_content_when_theme_feature_enabled | assert | variable | 42 | from tests.interface import theme_features
from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
import pytest
def enabled_context():
toc_list = [{
"title": "first_header_placeholder",
"level": 0,
"children": [
{
"title": "child_header_placeholder"... | rendered_side_panel | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/side_panel/test_side_panel.py | test_no_panel_content_when_theme_feature_enabled | assert_* | variable | 43 | from tests.interface import theme_features
from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
import pytest
def enabled_context():
toc_list = [{
"title": "first_header_placeholder",
"level": 0,
"children": [
{
"title": "child_header_placeholder"... | ALLOW_EMPTY_ELEMENTS) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/side_panel/test_side_toc.py | test_no_content_when_theme_feature_enabled | assert | string_literal | 42 | from tests.interface import theme_features, page_features
from tests.utils.html import assert_valid_html
import pytest
def enabled_context():
toc_list = [{
"title": "first_header_placeholder",
"level": 0,
"children": [
{
"title": "child_header_placeholder",
... | "" | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/side_panel/test_side_toc.py | test_has_entries_when_page_has_headers | assert | variable | 42 | from tests.interface import theme_features, page_features
from tests.utils.html import assert_valid_html
import pytest
def enabled_context():
toc_list = [{
"title": "first_header_placeholder",
"level": 0,
"children": [
{
"title": "child_header_placeholder",
... | rendered_side_toc | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/side_panel/test_side_toc.py | test_has_entries_when_page_has_headers | assert_* | variable | 44 | from tests.interface import theme_features, page_features
from tests.utils.html import assert_valid_html
import pytest
def enabled_context():
toc_list = [{
"title": "first_header_placeholder",
"level": 0,
"children": [
{
"title": "child_header_placeholder",
... | rendered_side_toc) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_footer.py | test_no_prev_next_when_feature_disabled | assert | variable | 70 | from tests.utils.html import assert_valid_html
from tests.interface import theme_features, theme_plugins
from unittest.mock import MagicMock, PropertyMock
import pytest
PREV_URL = "prev_page_title_placeholder"
PREV_TITLE = "prev_page_url_placeholder"
NEXT_URL = "next_page_url_placeholder"
NEXT_TITLE = "next_page_title_... | rendered_footer | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_revision.py | test_no_content_when_plugin_disabled | assert | string_literal | 54 | from tests.utils.html import assert_valid_html
from tests.interface import page_features, theme_features, theme_plugins
import pytest
def revision_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("partials/page-content/revision.html")
def enabled_context():
return {
"pag... | "" | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_revision.py | test_last_updated_text_when_page_has_revision_date | assert | variable | 33 | from tests.utils.html import assert_valid_html
from tests.interface import page_features, theme_features, theme_plugins
import pytest
def revision_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("partials/page-content/revision.html")
def enabled_context():
return {
"pag... | rendered_revision | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_revision.py | test_last_updated_text_when_page_has_revision_date | assert_* | variable | 34 | from tests.utils.html import assert_valid_html
from tests.interface import page_features, theme_features, theme_plugins
import pytest
def revision_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("partials/page-content/revision.html")
def enabled_context():
return {
"pag... | rendered_revision) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_style.py | test_that_default_palette_included_by_default | assert | variable | 23 | from tests.utils.html import assert_valid_html
from tests.interface import theme_features
from tests.utils.filters import MOCK_URL_PATH_PREFIX
import pytest
def styles_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("partials/styles.html")
def enabled_context():
return {
... | rendered_styles | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_style.py | test_that_default_palette_included_by_default | assert_* | variable | 24 | from tests.utils.html import assert_valid_html
from tests.interface import theme_features
from tests.utils.filters import MOCK_URL_PATH_PREFIX
import pytest
def styles_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_template("partials/styles.html")
def enabled_context():
return {
... | rendered_styles) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/test_test_setup.py | test_filesystem_terminal_loader_can_load_terminal_template | assert | none_literal | 9 | from jinja2 import TemplateNotFound
class TestTestSetup():
def test_filesystem_terminal_loader_can_load_terminal_template(self, env_with_terminal_loader):
try:
found_template = env_with_terminal_loader.get_template("base.html")
assert found_template is not | None | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_grid.py | test_grid_with_no_tiles_is_empty_string | assert | string_literal | 19 | from tests.utils.html import assert_valid_html
from tests.utils.filters import mock_markup_filter
from tests.interface import theme_plugins
import pytest
GRID_PARTIAL_PATH = "pluglets/tile_grid/templates/j2-partials/tiles.html"
def grid_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_templat... | "" | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_grid.py | test_grid_with_one_tile | assert | variable | 26 | from tests.utils.html import assert_valid_html
from tests.utils.filters import mock_markup_filter
from tests.interface import theme_plugins
import pytest
GRID_PARTIAL_PATH = "pluglets/tile_grid/templates/j2-partials/tiles.html"
def grid_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_templat... | rendered_grid | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_grid.py | test_grid_with_one_tile | assert_* | variable | 27 | from tests.utils.html import assert_valid_html
from tests.utils.filters import mock_markup_filter
from tests.interface import theme_plugins
import pytest
GRID_PARTIAL_PATH = "pluglets/tile_grid/templates/j2-partials/tiles.html"
def grid_partial(env_with_terminal_loader):
return env_with_terminal_loader.get_templat... | rendered_grid) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_grid_placement.py | assert_markdown_content_in_page | assert | variable | 51 | from tests.utils.html import assert_valid_html
from tests.interface import page_features, theme_plugins, theme_features
import pytest
PAGE_BASE_PARTIAL_PATH = "partials/page-base.html"
INLINE_MACRO_CALL = "{{ tile_grid(page.meta) }}"
BEFORE_CONTENT_SECTION = "<section id=\"mkdocs-terminal-before-content\" class=\"term... | html_fragment | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_grid_placement.py | test_that_grid_is_in_expected_place | assert | variable | 103 | from tests.utils.html import assert_valid_html
from tests.interface import page_features, theme_plugins, theme_features
import pytest
PAGE_BASE_PARTIAL_PATH = "partials/page-base.html"
INLINE_MACRO_CALL = "{{ tile_grid(page.meta) }}"
BEFORE_CONTENT_SECTION = "<section id=\"mkdocs-terminal-before-content\" class=\"term... | rendered_page | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_grid_placement.py | test_that_grid_is_placed_after_markdown_by_default | assert_* | variable | 73 | from tests.utils.html import assert_valid_html
from tests.interface import page_features, theme_plugins, theme_features
import pytest
PAGE_BASE_PARTIAL_PATH = "partials/page-base.html"
INLINE_MACRO_CALL = "{{ tile_grid(page.meta) }}"
BEFORE_CONTENT_SECTION = "<section id=\"mkdocs-terminal-before-content\" class=\"term... | rendered_page) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_image.py | test_empty_image_is_invalid | assert | numeric_literal | 15 | from tests.interface.tile import Tile
from tests.utils.html import check_html
from tests.utils.html import assert_valid_html
from tests import defaults
import pytest
def image_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-macros/tile-image.j2")
clas... | 0 | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_image.py | test_minimal_image_only_includes_required | assert | variable | 15 | from tests.interface.tile import Tile
from tests.utils.html import check_html
from tests.utils.html import assert_valid_html
from tests import defaults
import pytest
def image_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-macros/tile-image.j2")
clas... | rendered_image | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_image.py | test_all_img_attributes_used | assert_* | variable | 19 | from tests.interface.tile import Tile
from tests.utils.html import check_html
from tests.utils.html import assert_valid_html
from tests import defaults
import pytest
def image_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-macros/tile-image.j2")
clas... | rendered_image) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile.py | test_empty_tile | assert | string_literal | 16 | from tests.interface.tile import Tile
from tests.utils.html import assert_valid_html, tile_has_anchor, tile_has_img
from tests.utils.filters import mock_markup_filter
from tests import defaults
import pytest
TILE_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile.j2"
def tile_macro(env_with_terminal_loader):
... | "" | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile.py | test_minimal_link_tile | assert | variable | 18 | from tests.interface.tile import Tile
from tests.utils.html import assert_valid_html, tile_has_anchor, tile_has_img
from tests.utils.filters import mock_markup_filter
from tests import defaults
import pytest
TILE_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile.j2"
def tile_macro(env_with_terminal_loader):
... | rendered_tile | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_link_start.py | test_that_link_start_contains_href_with_minimal_link_only_tile | assert | variable | 13 | from tests import defaults
from tests.interface import theme_pluglets
import pytest
def tile_link_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template("pluglets/tile_grid/templates/j2-macros/tile-link.j2")
class TestTileLinkHelper():
def test_that_link_start_contains_href_with_minima... | rendered_link_start | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | test_utils_with_minimal_link_tile | assert_* | variable | 38 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | minimal_link_tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | test_utils_with_minimal_image_tile | assert_* | variable | 38 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | minimal_image_tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | test_utils_with_valid_link_tile | assert_* | variable | 38 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | valid_link_only_tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | test_utils_with_valid_image_tile | assert_* | variable | 38 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | valid_image_only_tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | test_utils_with_valid_linked_image_tile | assert_* | variable | 38 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | valid_linked_image_tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | test_utils_with_minimal_linked_image_tile | assert_* | variable | 38 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | minimal_linked_image_tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | assert_link_only_tile_expectations | assert | func_call | 9 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == | macro.module.has_link(tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | assert_link_only_tile_expectations | assert | func_call | 10 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
as... | macro.module.is_valid(tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | assert_link_only_tile_expectations | assert | func_call | 13 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | macro.module.has_image(tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | assert_link_only_tile_expectations | assert | func_call | 11 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | macro.module.is_link_only(tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/tile_grid/test_tile_util.py | assert_link_only_tile_expectations | assert | func_call | 14 | import pytest
TILE_UTIL_MACRO_PATH = "pluglets/tile_grid/templates/j2-macros/tile-util.j2"
def tile_util_macro(env_with_terminal_loader):
return env_with_terminal_loader.get_template(TILE_UTIL_MACRO_PATH)
def assert_link_only_tile_expectations(macro, tile):
assert "true" == macro.module.has_link(tile)
ass... | macro.module.is_image_only(tile) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/top_nav/test_top_nav.py | test_no_content_when_theme_feature_enabled | assert | string_literal | 33 | from tests.interface import theme_features, page_features
from tests.utils.html import assert_valid_html
import pytest
def enabled_context():
nav_list = []
return {
"nav": nav_list,
"page": {
"meta": {
"hide": []
}
},
"config": {
... | "" | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/top_nav/test_top_nav.py | test_home_link_is_forward_slash_when_no_site_url | assert | variable | 34 | from tests.interface import theme_features, page_features
from tests.utils.html import assert_valid_html
import pytest
def enabled_context():
nav_list = []
return {
"nav": nav_list,
"page": {
"meta": {
"hide": []
}
},
"config": {
... | rendered_top_nav | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/top_nav/test_top_nav.py | test_home_link_is_forward_slash_when_no_site_url | assert_* | variable | 35 | from tests.interface import theme_features, page_features
from tests.utils.html import assert_valid_html
import pytest
def enabled_context():
nav_list = []
return {
"nav": nav_list,
"page": {
"meta": {
"hide": []
}
},
"config": {
... | rendered_top_nav) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/top_nav/test_top_nav_menu.py | test_no_page_links_when_nav_empty | assert | variable | 31 | from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
from tests.interface import theme_plugins
import pytest
def enabled_context(inactive_page_1, inactive_page_2):
nav_list = [inactive_page_1, inactive_page_2]
return {
"nav": nav_list,
"config": {
"site_name": "site_... | rendered_nav | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/top_nav/test_top_nav_menu.py | test_no_page_links_when_nav_empty | assert_* | variable | 30 | from tests.utils.html import assert_valid_html, ALLOW_EMPTY_ELEMENTS
from tests.interface import theme_plugins
import pytest
def enabled_context(inactive_page_1, inactive_page_2):
nav_list = [inactive_page_1, inactive_page_2]
return {
"nav": nav_list,
"config": {
"site_name": "site_... | ALLOW_EMPTY_ELEMENTS) | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
ntno/mkdocs-terminal | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | train | train | tests/utils/html.py | assert_tile_has_terminal_marker | assert | variable | 41 | from tidylib import tidy_fragment
import pytest
DEBUG = False
VERBOSE = False
DEFAULT_TIDY_OPTIONS = {"numeric-entities": 1}
ALLOW_EMPTY_ELEMENTS = {"numeric-entities": 1, "drop-empty-elements": "no"}
def check_html(fragment, tidy_options=DEFAULT_TIDY_OPTIONS):
result = {}
document, errors = tidy_fragment(frag... | html | 49c5972197e62accb6dc5f72058d7f553fbc8294 | 19 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/test_logs.py | test_color | assert | string_literal | 9 | import pytest
from thefuck import logs
def test_color(settings):
settings.no_colors = False
assert logs.color('red') == 'red'
settings.no_colors = True
assert logs.color('red') == | '' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/rules/test_sl_ls.py | test_get_new_command | assert | string_literal | 6 | from thefuck.rules.sl_ls import match, get_new_command
from thefuck.types import Command
def test_get_new_command():
assert get_new_command(Command('sl', '')) == | 'ls' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_bash.py | test_to_shell | assert | string_literal | 19 | import os
import pytest
from thefuck.shells import Bash
class TestBash(object):
def shell(self):
return Bash()
def shell_aliases(self):
os.environ['TF_SHELL_ALIASES'] = (
'alias fuck=\'eval $(thefuck $(fc -ln -1))\'\n'
'alias l=\'ls -CF\'\n'
'alias la=\'ls ... | 'pwd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_fish.py | test_to_shell | assert | string_literal | 20 | import pytest
from thefuck.shells import Fish
class TestFish(object):
def shell(self):
return Fish()
def Popen(self, mocker):
mock = mocker.patch('thefuck.shells.fish.Popen')
mock.return_value.stdout.read.side_effect = [(
b'cd\nfish_config\nfuck\nfunced\nfuncsave\ngrep\nhi... | 'pwd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_generic.py | test_from_shell | assert | string_literal | 11 | import pytest
from thefuck.shells import Generic
class TestGeneric(object):
def shell(self):
return Generic()
def test_from_shell(self, shell):
assert shell.from_shell('pwd') == | 'pwd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_tcsh.py | test_to_shell | assert | string_literal | 20 | import pytest
from thefuck.shells.tcsh import Tcsh
class TestTcsh(object):
def shell(self):
return Tcsh()
def Popen(self, mocker):
mock = mocker.patch('thefuck.shells.tcsh.Popen')
mock.return_value.stdout.read.return_value = (
b'fuck\teval $(thefuck $(fc -ln -1))\n'
... | 'pwd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_zsh.py | test_to_shell | assert | string_literal | 19 | import os
import pytest
from thefuck.shells.zsh import Zsh
class TestZsh(object):
def shell(self):
return Zsh()
def shell_aliases(self):
os.environ['TF_SHELL_ALIASES'] = (
'fuck=\'eval $(thefuck $(fc -ln -1 | tail -n 1))\'\n'
'l=\'ls -CF\'\n'
'la=\'ls -A\'\... | 'pwd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/test_logs.py | test_color | assert | string_literal | 7 | import pytest
from thefuck import logs
def test_color(settings):
settings.no_colors = False
assert logs.color('red') == | 'red' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/test_utils.py | test_with_blank_cache | assert | string_literal | 60 | import pytest
import warnings
from mock import Mock, patch
from thefuck.utils import default_settings, \
memoize, get_closest, get_all_executables, replace_argument, \
get_all_matched_commands, is_app, for_app, cache, \
get_valid_history_without_current, _cache, get_close_matches
from thefuck.types import C... | 'test' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/rules/test_cd_parent.py | test_get_new_command | assert | string_literal | 6 | from thefuck.rules.cd_parent import match, get_new_command
from thefuck.types import Command
def test_get_new_command():
assert get_new_command(Command('cd..', '')) == | 'cd ..' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/rules/test_ls_all.py | test_get_new_command | assert | string_literal | 7 | from thefuck.rules.ls_all import match, get_new_command
from thefuck.types import Command
def test_get_new_command():
assert get_new_command(Command('ls empty_dir', '')) == 'ls -A empty_dir'
assert get_new_command(Command('ls', '')) == | 'ls -A' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/rules/test_ls_lah.py | test_get_new_command | assert | string_literal | 7 | from thefuck.rules.ls_lah import match, get_new_command
from thefuck.types import Command
def test_get_new_command():
assert get_new_command(Command('ls file.py', '')) == 'ls -lah file.py'
assert get_new_command(Command('ls', '')) == | 'ls -lah' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/rules/test_man_no_space.py | test_get_new_command | assert | string_literal | 6 | from thefuck.rules.man_no_space import match, get_new_command
from thefuck.types import Command
def test_get_new_command():
assert get_new_command(Command('mandiff', '')) == | 'man diff' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_bash.py | test_and_ | assert | string_literal | 19 | import os
import pytest
from thefuck.shells import Bash
class TestBash(object):
def shell(self):
return Bash()
def shell_aliases(self):
os.environ['TF_SHELL_ALIASES'] = (
'alias fuck=\'eval $(thefuck $(fc -ln -1))\'\n'
'alias l=\'ls -CF\'\n'
'alias la=\'ls ... | 'ls && cd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_bash.py | test_or_ | assert | string_literal | 19 | import os
import pytest
from thefuck.shells import Bash
class TestBash(object):
def shell(self):
return Bash()
def shell_aliases(self):
os.environ['TF_SHELL_ALIASES'] = (
'alias fuck=\'eval $(thefuck $(fc -ln -1))\'\n'
'alias l=\'ls -CF\'\n'
'alias la=\'ls ... | 'ls || cd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_generic.py | test_and_ | assert | string_literal | 11 | import pytest
from thefuck.shells import Generic
class TestGeneric(object):
def shell(self):
return Generic()
def test_and_(self, shell):
assert shell.and_('ls', 'cd') == | 'ls && cd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_generic.py | test_or_ | assert | string_literal | 11 | import pytest
from thefuck.shells import Generic
class TestGeneric(object):
def shell(self):
return Generic()
def test_or_(self, shell):
assert shell.or_('ls', 'cd') == | 'ls || cd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_tcsh.py | test_and_ | assert | string_literal | 20 | import pytest
from thefuck.shells.tcsh import Tcsh
class TestTcsh(object):
def shell(self):
return Tcsh()
def Popen(self, mocker):
mock = mocker.patch('thefuck.shells.tcsh.Popen')
mock.return_value.stdout.read.return_value = (
b'fuck\teval $(thefuck $(fc -ln -1))\n'
... | 'ls && cd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
nvbn/thefuck | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | train | train | tests/shells/test_tcsh.py | test_or_ | assert | string_literal | 20 | import pytest
from thefuck.shells.tcsh import Tcsh
class TestTcsh(object):
def shell(self):
return Tcsh()
def Popen(self, mocker):
mock = mocker.patch('thefuck.shells.tcsh.Popen')
mock.return_value.stdout.read.return_value = (
b'fuck\teval $(thefuck $(fc -ln -1))\n'
... | 'ls || cd' | 25142f81f83cf63c73764ec6e1f581a37af6838f | 341 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.