Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Aug 6, 2024
1 parent 08b52a2 commit f19780e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def app():


@pytest.fixture()
def stable_langdetect(app):
def _stable_langdetect(app):
"""Ensure that ``langdetect`` always returns the same thing.
See: https://github.com/Mimino666/langdetect#basic-usage.
Expand Down
9 changes: 5 additions & 4 deletions tests/test_hep_bd2xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from __future__ import absolute_import, division, print_function

import pytest
from dojson.contrib.marc21.utils import create_record
from inspire_schemas.api import load_schema, validate

Expand Down Expand Up @@ -175,8 +176,8 @@ def test_titles_from_245__a_b():

assert expected == result['245']


def test_title_translations_from_242__a(stable_langdetect):
@pytest.mark.usefixtures(name='_stable_langdetect')
def test_title_translations_from_242__a():
schema = load_schema('hep')
subschema = schema['properties']['title_translations']

Expand Down Expand Up @@ -206,8 +207,8 @@ def test_title_translations_from_242__a(stable_langdetect):

assert expected == result['242']


def test_title_translations_from_242__a_b(stable_langdetect):
@pytest.mark.usefixtures(name='_stable_langdetect')
def test_title_translations_from_242__a_b():
schema = load_schema('hep')
subschema = schema['properties']['title_translations']

Expand Down
2 changes: 1 addition & 1 deletion tests/test_hep_bd5xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def test_thesis_info_defense_date_from_500__a_incomplete_human_date():
result = hep.do(create_record(snippet))

assert validate(result['thesis_info'], subschema) is None
expected == result['thesis_info']
assert expected == result['thesis_info']

expected = [
{'a': 'Presented on 1992-12'},
Expand Down

0 comments on commit f19780e

Please sign in to comment.