• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kedder / ofxstatement / 15469557513

05 Jun 2025 02:22PM UTC coverage: 95.087% (-0.7%) from 95.791%
15469557513

Pull #346

github

web-flow
Merge 93911324c into 01ae49451
Pull Request #346: Add support for INVEXPENSE

80 of 87 new or added lines in 4 files covered. (91.95%)

3 existing lines in 3 files now uncovered.

987 of 1038 relevant lines covered (95.09%)

3.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.59
/src/ofxstatement/tests/test_plugin.py
1
import unittest
4✔
2
from unittest import mock
4✔
3

4
import sys
4✔
5

6
if sys.version_info < (3, 10):
4✔
UNCOV
7
    from importlib_metadata import EntryPoints
×
8
else:
9
    from importlib.metadata import EntryPoints
4✔
10

11
from ofxstatement import plugin
4✔
12

13

14
class PluginTest(unittest.TestCase):
4✔
15
    def test_get_plugin(self) -> None:
4✔
16
        class SamplePlugin(plugin.Plugin):
4✔
17
            def get_parser(self):
4✔
18
                return mock.Mock()
×
19

20
        ep = mock.Mock()
4✔
21
        ep.load.return_value = SamplePlugin
4✔
22
        ep_patch = mock.patch(
4✔
23
            "ofxstatement.plugin.entry_points", return_value=EntryPoints([ep])
24
        )
25
        with ep_patch:
4✔
26
            p = plugin.get_plugin("sample", mock.Mock("UI"), mock.Mock("Settings"))
4✔
27
            self.assertIsInstance(p, SamplePlugin)
4✔
28

29
    def test_get_plugin_conflict(self) -> None:
4✔
30
        ep = mock.Mock()
4✔
31

32
        ep_patch = mock.patch(
4✔
33
            "ofxstatement.plugin.entry_points", return_value=EntryPoints([ep, ep])
34
        )
35
        with ep_patch:
4✔
36
            with self.assertRaises(plugin.PluginNameConflict):
4✔
37
                plugin.get_plugin("conflicting", mock.Mock("UI"), mock.Mock("Settings"))
4✔
38

39
    def test_get_plugin_not_found(self) -> None:
4✔
40
        with self.assertRaises(plugin.PluginNotRegistered):
4✔
41
            plugin.get_plugin("not_existing", mock.Mock("UI"), mock.Mock("Settings"))
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc