repo_id string | cross_repo_split string | commit_index int32 | commit_sha string | in_repo_split string | test_file string | file_split string | split_group string | lineno int32 | col_offset int32 | assertion_type string | test_function string | prefix large_string | target string | assertion_event_type string | assertion_event_id string | assertion_anchor large_string | old_target string | old_lineno int32 | old_col_offset int32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
wbopan/moffee | train | 15 | 38fb0a8fbf373819721fb7fa873f0d7b33a52b84 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 78 | 4 | assert | test_multiple_links | import os
import pytest
from moffie.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Create test directories and files
os.makedirs('/tmp/redirect_url_pytest/test_env/images', exist_ok=True)
os.makedirs('/tmp/redirect_url_pytest/test_env/docs', exist... | expected_document | added | 4957faa6a74abd0d75fcc040af9a723632cf06cf25c63c5b665d1bfc4923dcc7 | assert|test_multiple_links|import os import pytest from moffie.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Create test directories and files os.makedirs('/tmp/redirect_url_pytest/test_env/images', exist_ok=True) os.makedirs('/tmp/redirect_url_pytest/test_env... | null | null | null |
wbopan/moffee | train | 15 | 38fb0a8fbf373819721fb7fa873f0d7b33a52b84 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 112 | 4 | assert | test_links_with_anchors_and_queries | import os
import pytest
from moffie.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Create test directories and files
os.makedirs('/tmp/redirect_url_pytest/test_env/images', exist_ok=True)
os.makedirs('/tmp/redirect_url_pytest/test_env/docs', exist... | expected_document | added | a287977705bdfa4a41ce5279db0b0b6cd6fcf7277654aee41eeb8138e8003854 | assert|test_links_with_anchors_and_queries|import os import pytest from moffie.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Create test directories and files os.makedirs('/tmp/redirect_url_pytest/test_env/images', exist_ok=True) os.makedirs('/tmp/redirect_url... | null | null | null |
wbopan/moffee | train | 15 | 38fb0a8fbf373819721fb7fa873f0d7b33a52b84 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 131 | 4 | assert | test_no_resource_dir | import os
import pytest
from moffie.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Create test directories and files
os.makedirs('/tmp/redirect_url_pytest/test_env/images', exist_ok=True)
os.makedirs('/tmp/redirect_url_pytest/test_env/docs', exist... | expected_document | added | 0ce583b4655aea182429ab2d57d422a5a3623623a63b82f800f8d40ebe88e8d6 | assert|test_no_resource_dir|import os import pytest from moffie.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Create test directories and files os.makedirs('/tmp/redirect_url_pytest/test_env/images', exist_ok=True) os.makedirs('/tmp/redirect_url_pytest/test_en... | null | null | null |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 41 | 4 | assert | test_copy_statics_updates_links | import os
import pytest
import shutil
import tempfile
from moffie.main import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
with ope... | os.path.exists(target_dir) | added | b7c2391c457204e285a145fabcf6c2e4979e80ca160db1c76627a9d4b3cadc0a | assert|test_copy_statics_updates_links|import os import pytest import shutil import tempfile from moffie.main import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir, "document.p... | null | null | null |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 65 | 4 | assert | test_copy_statics_ignores_nonexistent_files | import os
import pytest
import shutil
import tempfile
from moffie.main import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
with ope... | updated_doc | added | ca26c652cb68cf2d8f041606050f63b685afdd81eb6a9ac63ec93913462642b4 | assert|test_copy_statics_ignores_nonexistent_files|import os import pytest import shutil import tempfile from moffie.main import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir,... | null | null | null |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 84 | 4 | assert | test_header_inheritance | import pytest
from moffie.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | None | modified | 06ed7ae408a217b7bf069e849100084e051f0961c041a4e9a564111e01464cb0 | assert|test_header_inheritance|import pytest from moffie.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## S... | None | 86 | 4 |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 125 | 4 | assert | test_title_and_subtitle | import pytest
from moffie.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | "Title" | modified | 2ad718e4a12ffe5c8b9298176cbf4a89e40e151a0d667be0965354d6f52fc945 | assert|test_title_and_subtitle|import pytest from moffie.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## S... | "Title" | 127 | 4 |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 167 | 4 | assert | test_chunking_vertical | import pytest
from moffie.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | Type.NODE | modified | dab54e5f963f86c9097231a30e02628f5ad986bf48b212302b6e88d511e1ed95 | assert|test_chunking_vertical|import pytest from moffie.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Se... | Type.NODE | 169 | 4 |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 56 | 4 | assert | test_absolute_urls | import os
import pytest
import tempfile
from moffie.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Use tempfile to create a temporary directory for the test environment
with tempfile.TemporaryDirectory() as temp_dir:
# Create test directories ... | expected_document | added | d7c923bf04168c0996f1eab7eaed394e41991857b97a873892e53cc1ea50e8e8 | assert|test_absolute_urls|import os import pytest import tempfile from moffie.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Use tempfile to create a temporary directory for the test environment with tempfile.TemporaryDirectory() as temp_dir: # Create test dire... | null | null | null |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 92 | 4 | assert | test_multiple_links | import os
import pytest
import tempfile
from moffie.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Use tempfile to create a temporary directory for the test environment
with tempfile.TemporaryDirectory() as temp_dir:
# Create test directories ... | expected_document | added | 7ba7e64d5f139f6bcc1f590d32a367f6a04f8c8d56ea75245c41b47b08a4a6e9 | assert|test_multiple_links|import os import pytest import tempfile from moffie.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Use tempfile to create a temporary directory for the test environment with tempfile.TemporaryDirectory() as temp_dir: # Create test dir... | null | null | null |
wbopan/moffee | train | 16 | dc8391cb50ea0f48b25754188bc875c3dc5279e2 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 109 | 4 | assert | test_complex_relative_paths | import os
import pytest
import tempfile
from moffie.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Use tempfile to create a temporary directory for the test environment
with tempfile.TemporaryDirectory() as temp_dir:
# Create test directories ... | expected_document | added | 9374f44667e2e33bd0d06ee3b3844616f9ed0c0f092943fed2a8b069fb0d944f | assert|test_complex_relative_paths|import os import pytest import tempfile from moffie.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Use tempfile to create a temporary directory for the test environment with tempfile.TemporaryDirectory() as temp_dir: # Create ... | null | null | null |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 41 | 4 | assert | test_copy_statics_updates_links | import os
import pytest
import shutil
import tempfile
from moffee.main import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
with ope... | os.path.exists(target_dir) | modified | b3711a2679512920c9a540038dbbea0044b3d00e1f51689f3cee137bef1c3751 | assert|test_copy_statics_updates_links|import os import pytest import shutil import tempfile from moffee.main import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir, "document.p... | os.path.exists(target_dir) | 41 | 4 |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 64 | 4 | assert | test_copy_statics_ignores_nonexistent_files | import os
import pytest
import shutil
import tempfile
from moffee.main import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
with ope... | updated_doc | modified | b1e4abcc2513b397fdcfcbbb358089874d4ab9fe60fa2209d9d1bf225a51f96f | assert|test_copy_statics_ignores_nonexistent_files|import os import pytest import shutil import tempfile from moffee.main import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir,... | updated_doc | 64 | 4 |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_md_helper.py | train | wbopan/moffee:tests/test_md_helper.py | 37 | 4 | assert | test_is_divider | import pytest
from moffee.utils.md_helper import (
is_comment,
is_empty,
get_header_level,
is_divider,
contains_image,
contains_deco,
extract_title,
rm_comments
)
def test_is_comment():
assert is_comment("<!-- This is a comment -->") == True
assert is_comment("This is not a com... | False | modified | 5fd64cb5e2f2e5799f1a1a898c994d79d8ec131d4a0e207bc1e03c24c2efee21 | assert|test_is_divider|import pytest from moffee.utils.md_helper import ( is_comment, is_empty, get_header_level, is_divider, contains_image, contains_deco, extract_title, rm_comments ) def test_is_comment(): assert is_comment("<!-- This is a comment -->") == True assert is_comment("This is not a comment") == False def... | False | 37 | 4 |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_md_helper.py | train | wbopan/moffee:tests/test_md_helper.py | 90 | 4 | assert | test_remove_html_comments | import pytest
from moffee.utils.md_helper import (
is_comment,
is_empty,
get_header_level,
is_divider,
contains_image,
contains_deco,
extract_title,
rm_comments
)
def test_is_comment():
assert is_comment("<!-- This is a comment -->") == True
assert is_comment("This is not a com... | multi_strip(expected) | modified | f392a708418168b2188645dae661093190302ff07eefa5517331db330bcd1236 | assert|test_remove_html_comments|import pytest from moffee.utils.md_helper import ( is_comment, is_empty, get_header_level, is_divider, contains_image, contains_deco, extract_title, rm_comments ) def test_is_comment(): assert is_comment("<!-- This is a comment -->") == True assert is_comment("This is not a comment") ==... | multi_strip(expected) | 90 | 4 |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_md_obsidian_ext.py | val | wbopan/moffee:tests/test_md_obsidian_ext.py | 7 | 4 | assert | import pytest
from markdown import markdown
def check_markdown_conversion(text, expected):
md = markdown(text, extensions=["moffee.utils.md_obsidian_ext"])
assert md.strip() == | expected.strip() | modified | 5e8d22c778aae600868eae59fce67a032590ee76d46a0bb0333c3c80600a2b43 | assert||import pytest from markdown import markdown def check_markdown_conversion(text, expected): md = markdown(text, extensions=["moffee.utils.md_obsidian_ext"]) assert md.strip() == | expected.strip() | 7 | 4 | |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 140 | 4 | assert | test_adjacent_headings_same_level | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | "Heading" | modified | 4ce63abc2d1453edf6224f31cfc903f4d02e2460d12efdbb7169e9715a435c6f | assert|test_adjacent_headings_same_level|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=ye... | "Heading" | 140 | 4 |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_parse_deco.py | train | wbopan/moffee:tests/test_parse_deco.py | 21 | 9 | pytest.raises | test_invalid_deco | import pytest
from moffee.compositor import parse_deco, PageOption
def test_basic_deco():
line = "@(layout=split, background=blue)"
option = parse_deco(line)
assert option.layout == "split"
assert option.styles == {"background": "blue"}
def test_empty_deco():
line = "@()"
option = parse_dec... | ValueError) | modified | 2fd5e658de59e93315e8e0f71d41a1afcfe11206ab6af54fb45c9514b35d011f | pytest.raises|test_invalid_deco|import pytest from moffee.compositor import parse_deco, PageOption def test_basic_deco(): line = "@(layout=split, background=blue)" option = parse_deco(line) assert option.layout == "split" assert option.styles == {"background": "blue"} def test_empty_deco(): line = "@()" option = parse_... | ValueError) | 21 | 9 |
wbopan/moffee | train | 17 | f7ad580494a3dacb2348a4305e8e9db584be2e99 | train | tests/test_redirect_url.py | train | wbopan/moffee:tests/test_redirect_url.py | 145 | 4 | assert | test_no_resource_dir | import os
import pytest
import tempfile
from moffee.utils.md_helper import redirect_url
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
# Use tempfile to create a temporary directory for the test environment
with tempfile.TemporaryDirectory() as temp_dir:
# Create test directories ... | expected_document | modified | f1ef81686a89417106ec96b9c2521e502186c957e990eb0ded0bd5f1048528e8 | assert|test_no_resource_dir|import os import pytest import tempfile from moffee.utils.md_helper import redirect_url @pytest.fixture(scope='module', autouse=True) def setup_test_env(): # Use tempfile to create a temporary directory for the test environment with tempfile.TemporaryDirectory() as temp_dir: # Create test di... | expected_document | 145 | 4 |
wbopan/moffee | train | 18 | 856a6443b666c667e32b10dabfd83e06a1214145 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 153 | 4 | assert | test_title_and_subtitle | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | "Subtitle" | added | 24418d7f010909785aa071136d639c143a821ba0dcec72089ba312014fd2f620 | assert|test_title_and_subtitle|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## S... | null | null | null |
wbopan/moffee | train | 18 | 856a6443b666c667e32b10dabfd83e06a1214145 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 196 | 4 | assert | test_chunking_vertical | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | Direction.VERTICAL | added | ae74495d292917a5bbcb246e56f08946f4f75b44ebf7675a82df91f3209adca5 | assert|test_chunking_vertical|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Se... | null | null | null |
wbopan/moffee | train | 18 | 856a6443b666c667e32b10dabfd83e06a1214145 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 233 | 4 | assert | test_chunking_hybrid | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | Type.PARAGRAPH | added | e5f1ba26f8efe1a4c8bcf6e0659b546c28acccc2c605941db3a88c9886020738 | assert|test_chunking_hybrid|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Seco... | null | null | null |
wbopan/moffee | train | 18 | 856a6443b666c667e32b10dabfd83e06a1214145 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 262 | 4 | assert | test_deco_handling | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet p... | {'background': 'blue'} | added | a3e2f277980f6ff44579529a27ba429fe5202f6934c4a232c85253457d899554 | assert|test_deco_handling|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Second... | null | null | null |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 41 | 4 | assert | test_copy_statics_updates_links | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | os.path.exists(target_dir) | modified | 06e327e04feb71fbc1ccf10897342462889401727591e0f63fb8654272e8f675 | assert|test_copy_statics_updates_links|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir... | os.path.exists(target_dir) | 41 | 4 |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 64 | 4 | assert | test_copy_statics_ignores_nonexistent_files | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | modified | 090a0d552c952522589b9a58bb73abe152d729d30f83045f50f3f6837f5a6a99 | assert|test_copy_statics_ignores_nonexistent_files|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.j... | updated_doc | 64 | 4 |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 65 | 4 | assert | test_copy_statics_ignores_nonexistent_files | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | modified | 3847fa7710b2c2412d0ad6903ffe9d688b2aac031b2ed60272cbc111b6d71b88 | assert|test_copy_statics_ignores_nonexistent_files|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.j... | updated_doc | 65 | 4 |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 82 | 4 | assert | test_copy_statics_creates_target_directory | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_statics,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | os.path.exists(target_dir) | modified | 7e8cba66970caf307fe798b3b0b22a89d1b4025c03ef9d7308e415134f81f2e3 | assert|test_copy_statics_creates_target_directory|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_statics, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.jo... | os.path.exists(target_dir) | 82 | 4 |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_redirect_paths.py | train | wbopan/moffee:tests/test_redirect_paths.py | 40 | 4 | assert | test_redirect_paths | import pytest
import tempfile
import os
from moffee.utils.file_helper import redirect_paths
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
with tempfile.TemporaryDirectory() as temp_dir:
# Setup test files and directories
doc_path = os.path.join(temp_dir, "test.md")
res... | redirected_document | added | b6d9bbbfa33325c30ca12adb4c0421b1fd70f80bfe266a424cccfe63cc9154e5 | assert|test_redirect_paths|import pytest import tempfile import os from moffee.utils.file_helper import redirect_paths @pytest.fixture(scope='module', autouse=True) def setup_test_env(): with tempfile.TemporaryDirectory() as temp_dir: # Setup test files and directories doc_path = os.path.join(temp_dir, "test.md") res_d... | null | null | null |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_redirect_paths.py | train | wbopan/moffee:tests/test_redirect_paths.py | 41 | 4 | assert | test_redirect_paths | import pytest
import tempfile
import os
from moffee.utils.file_helper import redirect_paths
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
with tempfile.TemporaryDirectory() as temp_dir:
# Setup test files and directories
doc_path = os.path.join(temp_dir, "test.md")
res... | redirected_document | added | 018513078b9afba486b96524f3c34018ed94c2c20ba1986868404c96584581a1 | assert|test_redirect_paths|import pytest import tempfile import os from moffee.utils.file_helper import redirect_paths @pytest.fixture(scope='module', autouse=True) def setup_test_env(): with tempfile.TemporaryDirectory() as temp_dir: # Setup test files and directories doc_path = os.path.join(temp_dir, "test.md") res_d... | null | null | null |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_redirect_paths.py | train | wbopan/moffee:tests/test_redirect_paths.py | 59 | 4 | assert | test_redirect_paths_no_res_dir | import pytest
import tempfile
import os
from moffee.utils.file_helper import redirect_paths
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
with tempfile.TemporaryDirectory() as temp_dir:
# Setup test files and directories
doc_path = os.path.join(temp_dir, "test.md")
res... | redirected_document | added | b4e5fa4954f4643bb5a56336de10d9df4d55268d82c1f7c79bd3fa71e0b2f86c | assert|test_redirect_paths_no_res_dir|import pytest import tempfile import os from moffee.utils.file_helper import redirect_paths @pytest.fixture(scope='module', autouse=True) def setup_test_env(): with tempfile.TemporaryDirectory() as temp_dir: # Setup test files and directories doc_path = os.path.join(temp_dir, "test... | null | null | null |
wbopan/moffee | train | 19 | 30fb1fb6cc77e84f3de7559dd25aa4f4cfbb6b61 | train | tests/test_redirect_paths.py | train | wbopan/moffee:tests/test_redirect_paths.py | 72 | 4 | assert | test_redirect_paths_trivial | import pytest
import tempfile
import os
from moffee.utils.file_helper import redirect_paths
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
with tempfile.TemporaryDirectory() as temp_dir:
# Setup test files and directories
doc_path = os.path.join(temp_dir, "test.md")
res... | document | added | e23d133887ad7dc70345c7d928b5f69355d8c8823397c3f44990be23b7b5b6c9 | assert|test_redirect_paths_trivial|import pytest import tempfile import os from moffee.utils.file_helper import redirect_paths @pytest.fixture(scope='module', autouse=True) def setup_test_env(): with tempfile.TemporaryDirectory() as temp_dir: # Setup test files and directories doc_path = os.path.join(temp_dir, "test.md... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 70 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir():
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default")
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
resource_... | "beamer" | added | faf86dce82f6417ca4a80e921e4041f6f2f57933ce92b8dd416b30a4e5182771 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default") @pytest.fixture(scope='module', autouse=True) def setup_test_env(): doc = ""... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 72 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir():
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default")
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
resource_... | "resources" | added | b78ff50d971749536f4b6c1379416ca69760463704e464aac08c0b5fd64e9892 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default") @pytest.fixture(scope='module', autouse=True) def setup_test_env(): doc = ""... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 83 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir():
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default")
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
resource_... | os.path.exists(j(output_dir, "js")) | added | c1fa04a0102382b17db42c0da7ca6fde9ce69a642a2679736f86e33c775a0b82 | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default") @pytest.fixture(scope='module', autouse=True) def setup_test_env(): doc = """ --- r... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 84 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir():
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default")
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
resource_... | os.path.exists(j(output_dir, "assets")) | added | 311ff533bbfa18c3fa3f2b3f90ca7ec0990e0700d071a2edcb625a490aa56c6a | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", "default") @pytest.fixture(scope='module', autouse=True) def setup_test_env(): doc = """ --- r... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 41 | 4 | assert | test_copy_assets_updates_links | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | os.path.exists(target_dir) | added | b44067eb391ca1b6b7cf35092d1397fc36748813648b3ecf343a04eeb1562203 | assert|test_copy_assets_updates_links|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir, ... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 49 | 8 | assert | test_copy_assets_updates_links | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | added | b9f48576471f6c4506574a421d40d996d2ab87ef39b3e15661ed21de4edd06d8 | assert|test_copy_assets_updates_links|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir, ... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 65 | 4 | assert | test_copy_assets_ignores_nonexistent_files | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | added | 3a6183525853924a26ded1472b591189ca3156b197a927ed9c4329459be850e9 | assert|test_copy_assets_ignores_nonexistent_files|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.joi... | null | null | null |
wbopan/moffee | train | 20 | fe1f1c4e71bdc225c3cf6889dccc4fa9eacd0630 | train | tests/test_copy_statics.py | train | wbopan/moffee:tests/test_copy_statics.py | 82 | 4 | assert | test_copy_assets_creates_target_directory | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | os.path.exists(target_dir) | added | 51e0ce6792325d07f16e784acf6d6fcbcb2d7bc9dfe241275271d3b95a07310a | assert|test_copy_assets_creates_target_directory|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join... | null | null | null |
wbopan/moffee | train | 21 | 590f9891d43f79193cfde825c6cc9dc71129a3dc | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 70 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
... | "beamer" | modified | 7aa7e5e42cb0baeb6f284de695468c69f60f3ef7cb875a9d3819a06026d65c12 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixture(scope='module', autouse=True) def setup_test_env():... | "beamer" | 70 | 4 |
wbopan/moffee | train | 21 | 590f9891d43f79193cfde825c6cc9dc71129a3dc | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 71 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
... | "red" | modified | c635f7b574576eee4d2294bad9625f412ced2db337e07b341af8151aed869f26 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixture(scope='module', autouse=True) def setup_test_env():... | "red" | 71 | 4 |
wbopan/moffee | train | 21 | 590f9891d43f79193cfde825c6cc9dc71129a3dc | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 83 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
... | os.path.exists(j(output_dir, "css")) | modified | 1b028cf4b5fa907aa33a330932b8adaed55f87af109d8aefc2ea456b214f8691 | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixture(scope='module', autouse=True) def setup_test_env(): doc = ... | os.path.exists(j(output_dir, "css")) | 82 | 4 |
wbopan/moffee | train | 21 | 590f9891d43f79193cfde825c6cc9dc71129a3dc | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 84 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='module', autouse=True)
def setup_test_env():
doc = """
---
... | os.path.exists(j(output_dir, "js")) | modified | 7349ae34c247962ee89c24b855798eea3e10236835563ac8aab5cb04c0311e7d | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixture(scope='module', autouse=True) def setup_test_env(): doc = ... | os.path.exists(j(output_dir, "js")) | 83 | 4 |
wbopan/moffee | train | 22 | 33c62b837348e7e40eb840cf9e1b70b819f6de84 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 72 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | "red" | modified | b1f39162bb7c8b1a81fa2ad36d4c920ac413a495bac731d6875e00dce6218e99 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest... | "red" | 71 | 4 |
wbopan/moffee | train | 22 | 33c62b837348e7e40eb840cf9e1b70b819f6de84 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 84 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | os.path.exists(j(output_dir, "css")) | modified | 032c2cd22e3e94e26a2b505cdffd6e355f05743b818574802d5dd7003eeda369 | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixtur... | os.path.exists(j(output_dir, "css")) | 83 | 4 |
wbopan/moffee | train | 22 | 33c62b837348e7e40eb840cf9e1b70b819f6de84 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 90 | 8 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | output_html | modified | f5b8e0a1306dc6e9b2a096d28d706c72c91baa89faa2d867a200802ad5b8e183 | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixtur... | output_html | 89 | 8 |
wbopan/moffee | train | 22 | 33c62b837348e7e40eb840cf9e1b70b819f6de84 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 124 | 4 | assert | test_retrieve_structure | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | [ {"h1": "Title", "h2": None, "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": "Subheading1"}, {"h1": "Title", "h2": "Heading2", "h3": "Subheading1"}, {"h1": "Title2", "h2": None, "h3": None} ] | added | e0d1f6da68ec191afb9efa32599366f4fd8d3203ab00ce6da687b1d91d5ba4f9 | assert|test_retrieve_structure|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @... | null | null | null |
wbopan/moffee | train | 23 | dcd392ea58aaf0d7846ca2189586b6c7edf55cae | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 73 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | "resources" | modified | bb349c38248af8c655421d2c1d8ee6fdb9d47e027d145ec630a5d41bb5deb2da | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest... | "resources" | 73 | 4 |
wbopan/moffee | train | 23 | dcd392ea58aaf0d7846ca2189586b6c7edf55cae | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 86 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | os.path.exists(j(output_dir, "assets")) | modified | 7280e8307eb38e860ed5bcb110e00ffb5ae507fce8c36201c1361626e16b0def | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixtur... | os.path.exists(j(output_dir, "assets")) | 86 | 4 |
wbopan/moffee | train | 23 | dcd392ea58aaf0d7846ca2189586b6c7edf55cae | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 115 | 4 | assert | test_retrieve_structure | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | [ {"level": 1, "content": "Title", "page_ids": [0, 1, 2, 3]}, {"level": 2, "content": "Heading1", "page_ids": [1, 2]}, {"level": 3, "content": "Subheading1", "page_ids": [2]}, {"level": 2, "content": "Heading2", "page_ids": [3]}, {"level": 3, "content": "Subheading1", "page_ids": [3]}, {"level": 1, "content": "Title2",... | modified | db7b5e0746e9c6a06bec753ee2b862c9a3d9a3e3182201a40350edef32045f47 | assert|test_retrieve_structure|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @... | [ {"level": 1, "content": "Title", "page_ids": [0, 1, 2, 3]}, {"level": 2, "content": "Heading1", "page_ids": [1, 2]}, {"level": 3, "content": "Subheading1", "page_ids": [2]}, {"level": 2, "content": "Heading2", "page_ids": [3]}, {"level": 3, "content": "Subheading1", "page_ids": [3]}, {"level": 1, "content": "Title2",... | 115 | 4 |
wbopan/moffee | train | 23 | dcd392ea58aaf0d7846ca2189586b6c7edf55cae | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 124 | 4 | assert | test_retrieve_structure | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope='mod... | [ {"h1": "Title", "h2": None, "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": "Subheading1"}, {"h1": "Title", "h2": "Heading2", "h3": "Subheading1"}, {"h1": "Title2", "h2": None, "h3": None} ] | modified | 9326d9c817d4aa836537e3d261860fc55618ce05f026baaf6db62acf9fa67d18 | assert|test_retrieve_structure|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @... | [ {"h1": "Title", "h2": None, "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": "Subheading1"}, {"h1": "Title", "h2": "Heading2", "h3": "Subheading1"}, {"h1": "Title2", "h2": None, "h3": None} ] | 124 | 4 |
wbopan/moffee | train | 24 | 49a935510c699f30250c88ba1b0724789ec85d78 | train | tests/test_copy_assets.py | train | wbopan/moffee:tests/test_copy_assets.py | 60 | 8 | assert | test_copy_assets_updates_links | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | added | d843ae371713623d2df921e744aef3decd2261b64b2ac04e06464aa6c1d43029 | assert|test_copy_assets_updates_links|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join(temp_dir, ... | null | null | null |
wbopan/moffee | train | 24 | 49a935510c699f30250c88ba1b0724789ec85d78 | train | tests/test_copy_assets.py | train | wbopan/moffee:tests/test_copy_assets.py | 87 | 4 | assert | test_copy_assets_ignores_nonexistent_files | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | added | c6e9c15cd6a5594ceda27e328151c6013f0b4488b7085a45df8fd2426fb62b20 | assert|test_copy_assets_ignores_nonexistent_files|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.joi... | null | null | null |
wbopan/moffee | train | 24 | 49a935510c699f30250c88ba1b0724789ec85d78 | train | tests/test_copy_assets.py | train | wbopan/moffee:tests/test_copy_assets.py | 115 | 4 | assert | test_copy_assets_creates_target_directory | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | os.path.exists(target_dir) | added | 0360659f37ab24ee78e58b84315bcfb6847092876ac66b2d56ae18001c7dabe9 | assert|test_copy_assets_creates_target_directory|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.join... | null | null | null |
wbopan/moffee | train | 24 | 49a935510c699f30250c88ba1b0724789ec85d78 | train | tests/test_copy_assets.py | train | wbopan/moffee:tests/test_copy_assets.py | 156 | 4 | assert | test_copy_assets_ignores_urls_in_text_content | import os
import pytest
import shutil
import tempfile
from moffee.utils.file_helper import (
copy_assets,
)
@pytest.fixture
def setup_test_environment():
temp_dir = tempfile.mkdtemp()
sample_image_path = os.path.join(temp_dir, "sample.png")
sample_pdf_path = os.path.join(temp_dir, "document.pdf")
... | updated_doc | added | e4659cae2d91a94d019dca59d6758ceda8e66a0b582703345c013cef75750bf6 | assert|test_copy_assets_ignores_urls_in_text_content|import os import pytest import shutil import tempfile from moffee.utils.file_helper import ( copy_assets, ) @pytest.fixture def setup_test_environment(): temp_dir = tempfile.mkdtemp() sample_image_path = os.path.join(temp_dir, "sample.png") sample_pdf_path = os.path.... | null | null | null |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 74 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope="m... | True | modified | a717ecc258f72cacd8e40baf1c0f896056f91e9083a40a69ce22aaedd7d7f274 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest... | "beam" | 71 | 4 |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 130 | 4 | assert | test_retrieve_structure | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope="m... | [ {"h1": "Title", "h2": None, "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": None}, {"h1": "Title", "h2": "Heading1", "h3": "Subheading1"}, {"h1": "Title", "h2": "Heading2", "h3": "Subheading1"}, {"h1": "Title2", "h2": None, "h3": None}, ] | added | c737361b096d2f7dd90739ffc916867de14a87cf0db70ac57693eaf16243e521 | assert|test_retrieve_structure|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @... | null | null | null |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_md_helper.py | train | wbopan/moffee:tests/test_md_helper.py | 36 | 4 | assert | test_is_divider | import pytest
from moffee.utils.md_helper import (
is_comment,
is_empty,
get_header_level,
is_divider,
contains_image,
contains_deco,
extract_title,
rm_comments,
)
def test_is_comment():
assert is_comment("<!-- This is a comment -->") == True
assert is_comment("This is not a co... | True | modified | ef7c83df597a6672677a7f1bba34cd90ba504fd68cb88e2bc6e0008bca5980df | assert|test_is_divider|import pytest from moffee.utils.md_helper import ( is_comment, is_empty, get_header_level, is_divider, contains_image, contains_deco, extract_title, rm_comments, ) def test_is_comment(): assert is_comment("<!-- This is a comment -->") == True assert is_comment("This is not a comment") == False de... | True | 36 | 4 |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_md_helper.py | train | wbopan/moffee:tests/test_md_helper.py | 98 | 4 | assert | test_remove_html_comments | import pytest
from moffee.utils.md_helper import (
is_comment,
is_empty,
get_header_level,
is_divider,
contains_image,
contains_deco,
extract_title,
rm_comments,
)
def test_is_comment():
assert is_comment("<!-- This is a comment -->") == True
assert is_comment("This is not a co... | multi_strip(expected) | added | 10bf775e5654a6d69a2f1f47846eee1e391b716db6be13d2b9c8454f129ee781 | assert|test_remove_html_comments|import pytest from moffee.utils.md_helper import ( is_comment, is_empty, get_header_level, is_divider, contains_image, contains_deco, extract_title, rm_comments, ) def test_is_comment(): assert is_comment("<!-- This is a comment -->") == True assert is_comment("This is not a comment") =... | null | null | null |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 277 | 4 | assert | test_deco_handling | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet ... | "Hello" | modified | 657c08a68c75ef05a56cd4ed32f27da9578fef8fc0dc2acc48fb9d64f36a826d | assert|test_deco_handling|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Second... | 'Hello' | 260 | 4 |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 300 | 4 | assert | test_multiple_deco | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet ... | True | added | 2043565c072910de1ff5713890427493b729c2381a40a195919ed7b97768bcf4 | assert|test_multiple_deco|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Second... | null | null | null |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_redirect_paths.py | train | wbopan/moffee:tests/test_redirect_paths.py | 44 | 4 | assert | test_redirect_paths | import pytest
import tempfile
import os
from moffee.utils.file_helper import redirect_paths
@pytest.fixture(scope="module", autouse=True)
def setup_test_env():
with tempfile.TemporaryDirectory() as temp_dir:
# Setup test files and directories
doc_path = os.path.join(temp_dir, "test.md")
re... | redirected_document | modified | 269516e634c3aaa2022ced84337192e860d60af9199fd79db76fa34a59130bd8 | assert|test_redirect_paths|import pytest import tempfile import os from moffee.utils.file_helper import redirect_paths @pytest.fixture(scope="module", autouse=True) def setup_test_env(): with tempfile.TemporaryDirectory() as temp_dir: # Setup test files and directories doc_path = os.path.join(temp_dir, "test.md") res_d... | redirected_document | 41 | 4 |
wbopan/moffee | train | 25 | e2ec850191b66ca09cd461f830df5dbd8741b16a | train | tests/test_redirect_paths.py | train | wbopan/moffee:tests/test_redirect_paths.py | 63 | 4 | assert | test_redirect_paths_no_res_dir | import pytest
import tempfile
import os
from moffee.utils.file_helper import redirect_paths
@pytest.fixture(scope="module", autouse=True)
def setup_test_env():
with tempfile.TemporaryDirectory() as temp_dir:
# Setup test files and directories
doc_path = os.path.join(temp_dir, "test.md")
re... | redirected_document | modified | 294d9bc6e54bacc5078b2e49987a2819c91119b308f9d6b57e3dffee190e22dc | assert|test_redirect_paths_no_res_dir|import pytest import tempfile import os from moffee.utils.file_helper import redirect_paths @pytest.fixture(scope="module", autouse=True) def setup_test_env(): with tempfile.TemporaryDirectory() as temp_dir: # Setup test files and directories doc_path = os.path.join(temp_dir, "test... | redirected_document | 60 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 74 | 4 | assert | test_read_options | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope="m... | True | modified | 80c62fd8c02c419108c5c9f9d963e17b735195b44f98f00a16a555a01bff1165 | assert|test_read_options|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest... | True | 74 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 89 | 4 | assert | test_build | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope="m... | os.path.exists(j(output_dir, "css")) | modified | faa9999ae803ed1f43a770191f3e3e24c32674ebbb99bdf96e96acabba10cec7 | assert|test_build|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @pytest.fixtur... | os.path.exists(j(output_dir, "css")) | 89 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_builder.py | train | wbopan/moffee:tests/test_builder.py | 121 | 4 | assert | test_retrieve_structure | import os
import tempfile
import pytest
import re
from moffee.builder import build, render_jinja2, read_options, retrieve_structure
from moffee.compositor import composite
def template_dir(name="default"):
return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name)
@pytest.fixture(scope="m... | [ {"level": 1, "content": "Title", "page_ids": [0, 1, 2, 3]}, {"level": 2, "content": "Heading1", "page_ids": [1, 2]}, {"level": 3, "content": "Subheading1", "page_ids": [2]}, {"level": 2, "content": "Heading2", "page_ids": [3]}, {"level": 3, "content": "Subheading1", "page_ids": [3]}, {"level": 1, "content": "Title2",... | modified | a78af16df2245dbe02af009dcc8370062abf64d8c3fc73e14580732b72bfdc77 | assert|test_retrieve_structure|import os import tempfile import pytest import re from moffee.builder import build, render_jinja2, read_options, retrieve_structure from moffee.compositor import composite def template_dir(name="default"): return os.path.join(os.path.dirname(__file__), "..", "moffee", "templates", name) @... | [ {"level": 1, "content": "Title", "page_ids": [0, 1, 2, 3]}, {"level": 2, "content": "Heading1", "page_ids": [1, 2]}, {"level": 3, "content": "Subheading1", "page_ids": [2]}, {"level": 2, "content": "Heading2", "page_ids": [3]}, {"level": 3, "content": "Subheading1", "page_ids": [3]}, {"level": 1, "content": "Title2",... | 121 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_md_helper.py | train | wbopan/moffee:tests/test_md_helper.py | 16 | 4 | assert | test_is_comment | import pytest
from moffee.utils.md_helper import (
is_comment,
is_empty,
get_header_level,
is_divider,
contains_image,
contains_deco,
extract_title,
rm_comments,
)
def test_is_comment():
assert is_comment("<!-- This is a comment -->") is True
assert is_comment("This is not a co... | False | modified | aa370514034409f63b249017d160fd8120450f77b0804e86cf27415381e4f9fc | assert|test_is_comment|import pytest from moffee.utils.md_helper import ( is_comment, is_empty, get_header_level, is_divider, contains_image, contains_deco, extract_title, rm_comments, ) def test_is_comment(): assert is_comment("<!-- This is a comment -->") is True assert is_comment("This is not a comment") is | False | 16 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_md_helper.py | train | wbopan/moffee:tests/test_md_helper.py | 50 | 4 | assert | test_contains_image | import pytest
from moffee.utils.md_helper import (
is_comment,
is_empty,
get_header_level,
is_divider,
contains_image,
contains_deco,
extract_title,
rm_comments,
)
def test_is_comment():
assert is_comment("<!-- This is a comment -->") is True
assert is_comment("This is not a co... | True | modified | a16371d524df2095d922784b9e3f8a02e7ca0d2962682f0f29733019810cb89f | assert|test_contains_image|import pytest from moffee.utils.md_helper import ( is_comment, is_empty, get_header_level, is_divider, contains_image, contains_deco, extract_title, rm_comments, ) def test_is_comment(): assert is_comment("<!-- This is a comment -->") is True assert is_comment("This is not a comment") is Fals... | True | 50 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 164 | 4 | assert | test_title_and_subtitle | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet ... | "Title2" | modified | 67d558a564ee5d84cca0818f9040f37b4a1f05f34589e954dda1eb99f1904481 | assert|test_title_and_subtitle|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## S... | "Title2" | 164 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 207 | 4 | assert | test_chunking_vertical | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet ... | Type.NODE | modified | 2259250ec7289c0c8911fe600b1c3b3a436be258d3e266128b53a6d782283fb3 | assert|test_chunking_vertical|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Se... | Type.NODE | 207 | 4 |
wbopan/moffee | train | 26 | 7ff4add5da1a5aec9530b677d42fd0e6b0774168 | train | tests/test_paginate.py | train | wbopan/moffee:tests/test_paginate.py | 278 | 4 | assert | test_deco_handling | import pytest
from moffee.compositor import composite, Direction, Type
@pytest.fixture
def sample_document():
return """
---
background-color: gray
layout: split
default_h1: true
default_h2: false
---
# Main Title
## Subtitle
Content of the first slide.
---
@(background-color=yellow)
## Second Slide
- Bullet ... | False | modified | 895a755e6beee57a103ef2a4976d3e51eff1b6f2cc5701696b3df381451461cf | assert|test_deco_handling|import pytest from moffee.compositor import composite, Direction, Type @pytest.fixture def sample_document(): return """ --- background-color: gray layout: split default_h1: true default_h2: false --- # Main Title ## Subtitle Content of the first slide. --- @(background-color=yellow) ## Second... | False | 278 | 4 |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/integration/active_learning/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | val | webis-de/small-text:tests/integration/active_learning/integrations/pytorch/classifiers/test_kimcnn_embeddings.py | 43 | 8 | self.assertEqual | test_embed | import unittest
import pytest
import numpy as np
from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from active_learning.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from active_learning.integrations.pytorch.datasets import PytorchTextCla... | embeddings.shape[0]) | added | 3ce0a2255594dcae34a3d10a77927147819a348bf3b341535306e1bb3a190e50 | self.assertEqual|test_embed|import unittest import pytest import numpy as np from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from active_learning.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from active_learning.integrations.pytorch.datasets import P... | null | null | null |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/integration/active_learning/integrations/pytorch/test_query_strategies.py | train | webis-de/small-text:tests/integration/active_learning/integrations/pytorch/test_query_strategies.py | 55 | 8 | self.assertEqual | _simple_active_learning_test | import unittest
import pytest
import numpy as np
from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import trec_dataset
from tests.utils.object_factory import get_initialized_active_learner
try:
import torch
from active_learning.integrations.pytorch.c... | active_learner.x_indices_labeled.shape[0]) | added | d1ffc8e221d5ecba67b58cacc211d310918ff7fdb6d97a874e6b0336ed417a3c | self.assertEqual|_simple_active_learning_test|import unittest import pytest import numpy as np from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import trec_dataset from tests.utils.object_factory import get_initialized_active_learner try: import torch from activ... | null | null | null |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/integration/active_learning/integrations/pytorch/test_serialization.py | train | webis-de/small-text:tests/integration/active_learning/integrations/pytorch/test_serialization.py | 30 | 8 | self.assertFalse | test_and_load_with_file_str | import unittest
import tempfile
import pytest
import numpy as np
from numpy.testing import assert_array_equal
from active_learning.active_learner import PoolBasedActiveLearner
from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError
from active_learning.query_strategies import RandomSampling... | dataset._data[0][PytorchTextClassificationDataset.INDEX_TEXT].is_cuda) | added | 2323574ec70cc5c52c1a5d704b0be9d0c9c5b6e702f7b620dc0469a53abeaa81 | self.assertFalse|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from active_learning.active_learner import PoolBasedActiveLearner from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError from active_learni... | null | null | null |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/integration/active_learning/test_serialization.py | train | webis-de/small-text:tests/integration/active_learning/test_serialization.py | 66 | 8 | self.assertEqual | import unittest
import tempfile
import numpy as np
from pathlib import Path
from numpy.testing import assert_array_equal
from active_learning.active_learner import PoolBasedActiveLearner
from active_learning.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
from active_learning.query_strategie... | active_learner.query_strategy.__class__) | added | e60372f0b1eaea75a02f6be5030dd7f7cd5e33c83ffe0a6bd552ad9c46ece950 | self.assertEqual||import unittest import tempfile import numpy as np from pathlib import Path from numpy.testing import assert_array_equal from active_learning.active_learner import PoolBasedActiveLearner from active_learning.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory from active_learning.... | null | null | null | |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/unit/active_learning/integrations/pytorch/test_datasets.py | train | webis-de/small-text:tests/unit/active_learning/integrations/pytorch/test_datasets.py | 50 | 8 | self.assertEqual | test_get_features | import unittest
import pytest
import numpy as np
from collections import Counter
from numpy.testing import assert_array_equal
from parameterized import parameterized_class
from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from torchtext.vocab import Vocab
... | len(ds.x)) | added | 35b370f51ab9df893b4b58e8aab8f29f1badefa85fc574ec33cc638ed811f7c7 | self.assertEqual|test_get_features|import unittest import pytest import numpy as np from collections import Counter from numpy.testing import assert_array_equal from parameterized import parameterized_class from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from torchtext... | null | null | null |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/unit/active_learning/integrations/transformers/test_classification.py | test | webis-de/small-text:tests/unit/active_learning/integrations/transformers/test_classification.py | 24 | 13 | self.assertRaises | test_fine_tuning_arguments_invalid_lr | import unittest
import pytest
from unittest.mock import patch
from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from active_learning.integrations.transformers.classifiers.classification import \
FineTuningArguments, TransformerModelArguments, TransformerBasedClassificat... | ValueError) | added | bc26c4e42e3d01aa7fae2e93b7aa232a8216585949b552286135c3f03293cef6 | self.assertRaises|test_fine_tuning_arguments_invalid_lr|import unittest import pytest from unittest.mock import patch from active_learning.integrations.pytorch.exceptions import PytorchNotFoundError try: from active_learning.integrations.transformers.classifiers.classification import \ FineTuningArguments, TransformerM... | null | null | null |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/unit/active_learning/test_active_learner.py | train | webis-de/small-text:tests/unit/active_learning/test_active_learner.py | 96 | 16 | self.assertEqual | _test_initialize_data | import unittest
import numpy as np
from unittest.mock import patch, Mock, ANY
from numpy.testing import assert_array_equal
from active_learning.active_learner import (PoolBasedActiveLearner,
ActiveLearner, AbstractPoolBasedActiveLearner)
from active_learning.exceptions import LearnerNotInitializedException
from a... | clf_mock.fit.call_args[0][0].shape) | added | 1dd2a6ff63006f213b509b47b069ea4f46555dd3835d35d1797dbf1ddc84de96 | self.assertEqual|_test_initialize_data|import unittest import numpy as np from unittest.mock import patch, Mock, ANY from numpy.testing import assert_array_equal from active_learning.active_learner import (PoolBasedActiveLearner, ActiveLearner, AbstractPoolBasedActiveLearner) from active_learning.exceptions import Lear... | null | null | null |
webis-de/small-text | train | 0 | 84f52d505e0cee6dbc90772bcad6dc093bad4445 | train | tests/unit/active_learning/test_version.py | train | webis-de/small-text:tests/unit/active_learning/test_version.py | 9 | 8 | self.assertTrue | test_version | import unittest
class VersionTest(unittest.TestCase):
def test_version(self):
from active_learning.version import __version__
self.assertTrue( | isinstance(__version__, str)) | added | a5dba8aead9b12353812a4559cd3710605aa18ad93c754e418e1f0a6d8cac6fd | self.assertTrue|test_version|import unittest class VersionTest(unittest.TestCase): def test_version(self): from active_learning.version import __version__ self.assertTrue( | null | null | null |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/integration/small_text/integrations/pytorch/models/test_kimcnn.py | test | webis-de/small-text:tests/integration/small_text/integrations/pytorch/models/test_kimcnn.py | 33 | 8 | self.assertEqual | test_simple_prediction | import unittest
import pytest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNN
except (ImportError, PytorchNotFoundError):
pass
@pytest.mark.pytorch
class KimCNNIntegrationTest(unittest.Tes... | output.size(1)) | modified | db2371b8254b37feb0c2b870a3a1968bd99579acb1cc61ff7690f300a9857b3d | self.assertEqual|test_simple_prediction|import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: import torch from small_text.integrations.pytorch.classifiers.kimcnn import KimCNN except (ImportError, PytorchNotFoundError): pass @pytest.mark.pytorch class KimCNNInte... | output.size(1)) | 33 | 8 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/initialization/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/initialization/test_strategies.py | 62 | 8 | self.assertEqual | test_random_initialization_balanced | import unittest
import numpy as np
from unittest.mock import patch
from small_text.data import balanced_sampling, stratified_sampling
from small_text.initialization import random_initialization, \
random_initialization_stratified, random_initialization_balanced
class RandomInitializationTest(unittest.TestCase):... | len(indices)) | modified | 9e669018e3553f963804b11a24a198aa2cbd9d0c201a5eb273fc8bbc268f97d3 | self.assertEqual|test_random_initialization_balanced|import unittest import numpy as np from unittest.mock import patch from small_text.data import balanced_sampling, stratified_sampling from small_text.initialization import random_initialization, \ random_initialization_stratified, random_initialization_balanced class... | len(indices)) | 62 | 8 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/integrations/pytorch/classifiers/test_base.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_base.py | 48 | 8 | self.assertEqual | test_init_with_cuda_available | import unittest
import pytest
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.pytorch.classifiers import PytorchClassifier
class SimplePytorchClassifier(PytorchClassifier):
"""Simple subclass to allow inst... | clf.device) | modified | 2277af07a821028c82a82da36a0aefc7cb49c0528bc174a68ca40602e58f583a | self.assertEqual|test_init_with_cuda_available|import unittest import pytest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.classifiers import PytorchClassifier class SimplePytorchClassifier(PytorchClassifier): """Sim... | clf.device) | 48 | 8 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/integrations/pytorch/classifiers/test_kimcnn.py | train | webis-de/small-text:tests/unit/small_text/integrations/pytorch/classifiers/test_kimcnn.py | 122 | 12 | self.assertTrue | test_fit_without_validation_set | import unittest
import pytest
import numpy as np
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier
from small_text.integrations.pytorch.datasets import PytorchTextCla... | isinstance(call_args[1], PytorchTextClassificationDataset)) | modified | 3a030ae41d7b09ae9cb3e8dacc93e77463d1be23fb5ca1e171de09c3f9623679 | self.assertTrue|test_fit_without_validation_set|import unittest import pytest import numpy as np from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.classifiers.kimcnn import KimCNNClassifier from small_text.integrations.p... | isinstance(call_args[1], PytorchTextClassificationDataset)) | 122 | 12 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/query_strategies/test_strategies.py | train | webis-de/small-text:tests/unit/small_text/query_strategies/test_strategies.py | 226 | 8 | self.assertIsNotNone | test_least_confidence_multiclass | import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from unittest.mock import Mock
from small_text.classifiers import ConfidenceEnhancedLinearSVC
from small_text.query_strategies import EmptyPoolException, PoolExhaustedException
from small_text.query_strategies ... | strategy.scores_) | modified | 8ff8a95bf3a91788ea1005610fd9bd12e027d39321eda59585c134e117136954 | self.assertIsNotNone|test_least_confidence_multiclass|import unittest import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from unittest.mock import Mock from small_text.classifiers import ConfidenceEnhancedLinearSVC from small_text.query_strategies import EmptyPoolException, PoolE... | strategy.scores_) | 226 | 8 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/test_active_learner.py | val | webis-de/small-text:tests/unit/small_text/test_active_learner.py | 148 | 8 | assert_* | test_query_with_custom_representation | import unittest
import numpy as np
from unittest.mock import patch, Mock, ANY
from numpy.testing import assert_array_equal
from small_text.active_learner import (PoolBasedActiveLearner,
ActiveLearner, AbstractPoolBasedActiveLearner)
from small_text.exceptions import LearnerNotIn... | y_initial) | modified | c6b27176eefa7043f562b06fa80b71e3c93ce190ac48c1420d2ff595f5d064f9 | assert_*|test_query_with_custom_representation|import unittest import numpy as np from unittest.mock import patch, Mock, ANY from numpy.testing import assert_array_equal from small_text.active_learner import (PoolBasedActiveLearner, ActiveLearner, AbstractPoolBasedActiveLearner) from small_text.exceptions import Learne... | y_initial) | 148 | 8 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/test_version.py | test | webis-de/small-text:tests/unit/small_text/test_version.py | 9 | 8 | self.assertTrue | test_version | import unittest
class VersionTest(unittest.TestCase):
def test_version(self):
from small_text.version import __version__
self.assertTrue( | isinstance(__version__, str)) | modified | b9a51900100c3b3952ad9a9e31e898a96bb9c55a8e4fd06973e2061b7074f959 | self.assertTrue|test_version|import unittest class VersionTest(unittest.TestCase): def test_version(self): from small_text.version import __version__ self.assertTrue( | isinstance(__version__, str)) | 9 | 8 |
webis-de/small-text | train | 1 | bb1573ee5809594d67156de09cbc63e8386c41ed | train | tests/unit/small_text/utils/test_datetime.py | train | webis-de/small-text:tests/unit/small_text/utils/test_datetime.py | 19 | 8 | self.assertEqual | test_format_timedelta | import datetime
import unittest
from small_text.utils.datetime import format_timedelta
class DatetimeUtilsTest(unittest.TestCase):
def test_negative_timedelta(self):
td_negative = datetime.timedelta(minutes=-1)
with self.assertRaises(ValueError):
format_timedelta(td_negative)
de... | format_timedelta(td2)) | modified | a2898d413f4b3840820cf939f85982d50061d2eca7f3faa88d4b04a29ebb8b5c | self.assertEqual|test_format_timedelta|import datetime import unittest from small_text.utils.datetime import format_timedelta class DatetimeUtilsTest(unittest.TestCase): def test_negative_timedelta(self): td_negative = datetime.timedelta(minutes=-1) with self.assertRaises(ValueError): format_timedelta(td_negative) def ... | format_timedelta(td2)) | 19 | 8 |
webis-de/small-text | train | 2 | b68bc499e2e53f19ec5acf201ed9ed2b33dddf89 | train | tests/integration/test_datasets.py | train | webis-de/small-text:tests/integration/test_datasets.py | 12 | 8 | self.assertEqual | test_init_and_len | import unittest
from small_text.integrations.transformers.datasets import TransformersDataset
from tests.utils.datasets import random_transformer_dataset
class TransformersDatasetTest(unittest.TestCase):
def test_init_and_len(self):
data = random_transformer_dataset(10)
dataset = TransformersDat... | len(dataset)) | modified | 9d725dad864ab5c101db12944461510f71f8c298e556765dd33128f447b45974 | self.assertEqual|test_init_and_len|import unittest from small_text.integrations.transformers.datasets import TransformersDataset from tests.utils.datasets import random_transformer_dataset class TransformersDatasetTest(unittest.TestCase): def test_init_and_len(self): data = random_transformer_dataset(10) dataset = Tran... | len(dataset)) | 12 | 8 |
webis-de/small-text | train | 2 | b68bc499e2e53f19ec5acf201ed9ed2b33dddf89 | train | tests/integration/test_datasets.py | train | webis-de/small-text:tests/integration/test_datasets.py | 18 | 8 | self.assertEqual | test_indexing | import unittest
from small_text.integrations.transformers.datasets import TransformersDataset
from tests.utils.datasets import random_transformer_dataset
class TransformersDatasetTest(unittest.TestCase):
def test_init_and_len(self):
data = random_transformer_dataset(10)
dataset = TransformersDat... | len(subset)) | modified | 008980282764473490a14f1dc7a84d71d324cc1cdf467ef5b706c65f7e16258f | self.assertEqual|test_indexing|import unittest from small_text.integrations.transformers.datasets import TransformersDataset from tests.utils.datasets import random_transformer_dataset class TransformersDatasetTest(unittest.TestCase): def test_init_and_len(self): data = random_transformer_dataset(10) dataset = Transfor... | len(subset)) | 18 | 8 |
webis-de/small-text | train | 3 | 6e956bf2e0fa5c574d49ab6161591dbb90d801ba | train | tests/unit/small_text/utils/test_logging.py | train | webis-de/small-text:tests/unit/small_text/utils/test_logging.py | 264 | 8 | self.assertTrue | test_get_logger | import logging
import unittest
from logging import Logger, INFO, DEBUG
from unittest.mock import patch
from small_text import VerbosityLogger, verbosity_logger, VERBOSITY_QUIET, VERBOSITY_ALL
class VerbosityLoggerTest(unittest.TestCase):
@patch('small_text.utils.logging.Logger.debug')
def test_debug(self, ... | isinstance(first_logger, Logger)) | added | 600423debaa5ff43aaa430a5c559a1cfd05703b3b668722b80133a763a6cb1d0 | self.assertTrue|test_get_logger|import logging import unittest from logging import Logger, INFO, DEBUG from unittest.mock import patch from small_text import VerbosityLogger, verbosity_logger, VERBOSITY_QUIET, VERBOSITY_ALL class VerbosityLoggerTest(unittest.TestCase): @patch('small_text.utils.logging.Logger.debug') de... | null | null | null |
webis-de/small-text | train | 3 | 6e956bf2e0fa5c574d49ab6161591dbb90d801ba | train | tests/unit/small_text/utils/test_logging.py | train | webis-de/small-text:tests/unit/small_text/utils/test_logging.py | 268 | 12 | self.assertTrue | test_get_logger | import logging
import unittest
from logging import Logger, INFO, DEBUG
from unittest.mock import patch
from small_text import VerbosityLogger, verbosity_logger, VERBOSITY_QUIET, VERBOSITY_ALL
class VerbosityLoggerTest(unittest.TestCase):
@patch('small_text.utils.logging.Logger.debug')
def test_debug(self, ... | isinstance(second_logger, VerbosityLogger)) | added | 51828b4fad965ae161acce39bfbcf254be66c444cacfc5d7489f00318f2e2735 | self.assertTrue|test_get_logger|import logging import unittest from logging import Logger, INFO, DEBUG from unittest.mock import patch from small_text import VerbosityLogger, verbosity_logger, VERBOSITY_QUIET, VERBOSITY_ALL class VerbosityLoggerTest(unittest.TestCase): @patch('small_text.utils.logging.Logger.debug') de... | null | null | null |
webis-de/small-text | train | 4 | fcfd504ac001d36b86984aa30a810d0c203aed98 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 46 | 8 | self.assertEqual | test_transformer_model_arguments_init_with_paths | import unittest
import pytest
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArguments, TransformerModelArguments, TransformerBasedClassification
fr... | model_args.model) | modified | 29e49bf924b0f2770724bd16468c3713690da200d057ea158018a3c61db6eeb8 | self.assertEqual|test_transformer_model_arguments_init_with_paths|import unittest import pytest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.transformers.classifiers.classification import \ FineTuningArguments, TransformerM... | model_args.model) | 46 | 8 |
webis-de/small-text | train | 4 | fcfd504ac001d36b86984aa30a810d0c203aed98 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 60 | 13 | self.assertRaises | test_fit_where_y_is_none | import unittest
import pytest
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArguments, TransformerModelArguments, TransformerBasedClassification
fr... | ValueError) | modified | 93bf14dd9b6a808a50cd4e53e429fb065b620cafa8db4f8a9b90f5e815ba4e85 | self.assertRaises|test_fit_where_y_is_none|import unittest import pytest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.transformers.classifiers.classification import \ FineTuningArguments, TransformerModelArguments, Transfor... | ValueError) | 60 | 13 |
webis-de/small-text | train | 4 | fcfd504ac001d36b86984aa30a810d0c203aed98 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 75 | 12 | self.assertEqual | test_fit_without_validation_set | import unittest
import pytest
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArguments, TransformerModelArguments, TransformerBasedClassification
fr... | len(call_args[0]) + len(call_args[1])) | modified | 47d1236d568c5d2d3cddef383434c9a50394374fb618c97051b1f41ddc145e69 | self.assertEqual|test_fit_without_validation_set|import unittest import pytest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.transformers.classifiers.classification import \ FineTuningArguments, TransformerModelArguments, Tr... | len(call_args[0]) + len(call_args[1])) | 75 | 12 |
webis-de/small-text | train | 4 | fcfd504ac001d36b86984aa30a810d0c203aed98 | train | tests/unit/small_text/integrations/transformers/test_classification.py | train | webis-de/small-text:tests/unit/small_text/integrations/transformers/test_classification.py | 100 | 13 | self.assertRaises | test_fit_with_validation_set_but_missing_labels | import unittest
import pytest
from unittest.mock import patch
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.transformers.classifiers.classification import \
FineTuningArguments, TransformerModelArguments, TransformerBasedClassification
fr... | ValueError) | modified | 58bf306496c580cbaf281a8b1bbb509396926271db47e72170de1ebac4067311 | self.assertRaises|test_fit_with_validation_set_but_missing_labels|import unittest import pytest from unittest.mock import patch from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.transformers.classifiers.classification import \ FineTuningArguments, TransformerM... | ValueError) | 100 | 13 |
webis-de/small-text | train | 5 | d4e8f4d409e1b30a829f647ddf5aae8ff98f1ef7 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 76 | 12 | assert_* | test_and_load_with_file_str | import unittest
import tempfile
import pytest
import numpy as np
from numpy.testing import assert_array_equal
from transformers import AutoTokenizer
from small_text.active_learner import PoolBasedActiveLearner
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from small_text.query_strategi... | active_learner.x_indices_labeled) | modified | 89b4371bfb36c1959c63eae696616a4ae0a6f189fc91caa891901e98b5644a3f | assert_*|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from transformers import AutoTokenizer from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundErr... | active_learner.x_indices_labeled) | 76 | 12 |
webis-de/small-text | train | 5 | d4e8f4d409e1b30a829f647ddf5aae8ff98f1ef7 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 81 | 16 | assert_* | test_and_load_with_file_str | import unittest
import tempfile
import pytest
import numpy as np
from numpy.testing import assert_array_equal
from transformers import AutoTokenizer
from small_text.active_learner import PoolBasedActiveLearner
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from small_text.query_strategi... | weights_after[i].cpu().detach().numpy()) | modified | 38bb0bcba4305701d4478397561b3758b0b87f10a3a5aeb81c59f12c102fa6f6 | assert_*|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from transformers import AutoTokenizer from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNotFoundErr... | weights_after[i].cpu().detach().numpy()) | 81 | 16 |
webis-de/small-text | train | 5 | d4e8f4d409e1b30a829f647ddf5aae8ff98f1ef7 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 83 | 12 | self.assertIsNotNone | test_and_load_with_file_str | import unittest
import tempfile
import pytest
import numpy as np
from numpy.testing import assert_array_equal
from transformers import AutoTokenizer
from small_text.active_learner import PoolBasedActiveLearner
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from small_text.query_strategi... | active_learner.classifier) | modified | 8e7bd0310f11490ea5774553c1b927d55058464cfd6835449e3492a1ebc3749a | self.assertIsNotNone|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from transformers import AutoTokenizer from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import Pytorc... | active_learner.classifier) | 83 | 12 |
webis-de/small-text | train | 5 | d4e8f4d409e1b30a829f647ddf5aae8ff98f1ef7 | train | tests/integration/small_text/integrations/transformers/test_serialization.py | test | webis-de/small-text:tests/integration/small_text/integrations/transformers/test_serialization.py | 84 | 12 | self.assertEqual | test_and_load_with_file_str | import unittest
import tempfile
import pytest
import numpy as np
from numpy.testing import assert_array_equal
from transformers import AutoTokenizer
from small_text.active_learner import PoolBasedActiveLearner
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from small_text.query_strategi... | active_learner.query_strategy.__class__) | modified | 1ea27af3cebdb78656e70fd5a6f676eeb5adf35b8a8b834774b7e86039eedeed | self.assertEqual|test_and_load_with_file_str|import unittest import tempfile import pytest import numpy as np from numpy.testing import assert_array_equal from transformers import AutoTokenizer from small_text.active_learner import PoolBasedActiveLearner from small_text.integrations.pytorch.exceptions import PytorchNot... | active_learner.query_strategy.__class__) | 84 | 12 |
webis-de/small-text | train | 6 | 52b7e7d8926b9273fc079ee3d5b1d5ac1152f428 | train | tests/integration/small_text/integrations/pytorch/test_query_strategies.py | train | webis-de/small-text:tests/integration/small_text/integrations/pytorch/test_query_strategies.py | 49 | 8 | self.assertFalse | _simple_active_learning_test | import unittest
import pytest
import numpy as np
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
from tests.utils.datasets import trec_dataset
from tests.utils.object_factory import get_initialized_active_learner
try:
import torch
from small_text.integrations.pytorch.classifiers... | dataset[0].x[PytorchTextClassificationDataset.INDEX_TEXT].is_cuda) | added | 5780eb81004b991fef21f64d38972df7f977b24443034f0c5306a8f9940b2bbe | self.assertFalse|_simple_active_learning_test|import unittest import pytest import numpy as np from small_text.integrations.pytorch.exceptions import PytorchNotFoundError from tests.utils.datasets import trec_dataset from tests.utils.object_factory import get_initialized_active_learner try: import torch from small_text... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.