Skip to content

Commit

Permalink
Mock pywin32
Browse files Browse the repository at this point in the history
I think that this is the simpler approach.  See: pypa/pipenv/issues/
1575.
  • Loading branch information
aplaice committed Nov 7, 2022
1 parent 9633f3e commit b7b81e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/export/anki_exporter_wrapper_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

from mamba import describe, it, context

from test_utils.anki import MockAnkiModules

mock_anki_modules = MockAnkiModules(["win32file", "win32pipe", "pywintypes", "winerror"]) # Anki on Windows uses pywin32

from crowd_anki.export.anki_exporter_wrapper import AnkiJsonExporterWrapper

DUMMY_EXPORT_DIRECTORY = "/tmp"
Expand All @@ -23,3 +27,5 @@

notifier_mock.warning.assert_called_once()
exporter_mock.export_to_directory.assert_not_called()

mock_anki_modules.unmock()

0 comments on commit b7b81e7

Please # to comment.