17 lines
674 B
Python
17 lines
674 B
Python
import pytest
|
|
|
|
from tools.graphrag.graphrag import extract_work_title
|
|
from tools.graphrag.evaluation.source_oracle import acceptable_title
|
|
|
|
|
|
@pytest.mark.parametrize('label', ['rešerš', 'tutoriál', 'projekt', 'dokument', 'repozitár'])
|
|
def test_generic_deliverable_is_not_an_academic_title(label):
|
|
assert extract_work_title([f'- Písomná práca: [{label}](./report)']) is None
|
|
assert not acceptable_title(label, explicit=True)
|
|
|
|
|
|
def test_specific_deliverable_title_remains_supported():
|
|
title = 'Rešerš na tému prekladu'
|
|
assert extract_work_title([f'- Písomná práca: [{title}](./report)']) == title
|
|
assert acceptable_title(title, explicit=True)
|