Skip to content

Commit

Permalink
misc.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBernstorff committed Oct 27, 2023
1 parent 26473be commit 7e97a06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 1 addition & 4 deletions tests/exporters/anki/test_card_converter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections.abc import Sequence
from pathlib import Path

import genanki
from personal_mnemonic_medium.card_pipeline import CardPipeline
from personal_mnemonic_medium.exporters.anki.card_types.base import (
AnkiCard,
Expand Down Expand Up @@ -59,7 +58,7 @@ def test_custom_card_to_genanki_card():
uuid="1234",
source_path=Path(__file__),
)
genanki_note = AnkiQA(
AnkiQA(
fields=["Q. What is the capital of France?", "A. Paris"],
source_prompt=QAPrompt(
question="What is the capital of France?",
Expand All @@ -69,8 +68,6 @@ def test_custom_card_to_genanki_card():
),
).to_genanki_note()

assert isinstance(genanki_note, genanki.Note)


def test_get_subtags():
source_note = Document(
Expand Down
8 changes: 1 addition & 7 deletions tests/exporters/anki/test_package_generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pathlib import Path

import genanki
from personal_mnemonic_medium.exporters.anki.card_types.base import (
AnkiCard,
)
Expand Down Expand Up @@ -37,12 +36,7 @@ def test_cards_to_decks():
for _ in range(4)
]

deck, media = AnkiPackageGenerator().cards_to_deck(
cards=genanki_notes
)

assert isinstance(deck, genanki.Deck)
assert isinstance(media, set)
AnkiPackageGenerator().cards_to_deck(cards=genanki_notes)


def test_package_generators():
Expand Down

0 comments on commit 7e97a06

Please sign in to comment.