diff options
Diffstat (limited to 'beancount_extras_kris7t/plugins/default_tolerance_test.py')
-rw-r--r-- | beancount_extras_kris7t/plugins/default_tolerance_test.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/beancount_extras_kris7t/plugins/default_tolerance_test.py b/beancount_extras_kris7t/plugins/default_tolerance_test.py index 2e5c629..4ef84c1 100644 --- a/beancount_extras_kris7t/plugins/default_tolerance_test.py +++ b/beancount_extras_kris7t/plugins/default_tolerance_test.py | |||
@@ -3,13 +3,13 @@ __license__ = 'GNU GPLv2' | |||
3 | 3 | ||
4 | import unittest | 4 | import unittest |
5 | 5 | ||
6 | from beancount import loader | 6 | from beancount.loader import load_doc |
7 | from beancount.parser import cmptest | 7 | from beancount.parser import cmptest |
8 | 8 | ||
9 | 9 | ||
10 | class DefaultToleranceTest(cmptest.TestCase): | 10 | class DefaultToleranceTest(cmptest.TestCase): |
11 | 11 | ||
12 | @loader.load_doc() | 12 | @load_doc() |
13 | def test_account_with_tolerance(self, entries, errors, options_map): | 13 | def test_account_with_tolerance(self, entries, errors, options_map): |
14 | ''' | 14 | ''' |
15 | plugin "beancount_extras_kris7t.plugins.default_tolerance" | 15 | plugin "beancount_extras_kris7t.plugins.default_tolerance" |
@@ -28,7 +28,7 @@ class DefaultToleranceTest(cmptest.TestCase): | |||
28 | 2020-01-01 balance Assets:Checking 0 ~ 10 USD | 28 | 2020-01-01 balance Assets:Checking 0 ~ 10 USD |
29 | ''', entries) | 29 | ''', entries) |
30 | 30 | ||
31 | @loader.load_doc() | 31 | @load_doc() |
32 | def test_account_with_tolerance_override(self, entries, errors, options_map): | 32 | def test_account_with_tolerance_override(self, entries, errors, options_map): |
33 | ''' | 33 | ''' |
34 | plugin "beancount_extras_kris7t.plugins.default_tolerance" | 34 | plugin "beancount_extras_kris7t.plugins.default_tolerance" |
@@ -47,7 +47,7 @@ class DefaultToleranceTest(cmptest.TestCase): | |||
47 | 2020-01-01 balance Assets:Checking 10 ~ 20 USD | 47 | 2020-01-01 balance Assets:Checking 10 ~ 20 USD |
48 | ''', entries) | 48 | ''', entries) |
49 | 49 | ||
50 | @loader.load_doc() | 50 | @load_doc() |
51 | def test_account_with_tolerance_override_zero(self, entries, errors, options_map): | 51 | def test_account_with_tolerance_override_zero(self, entries, errors, options_map): |
52 | ''' | 52 | ''' |
53 | plugin "beancount_extras_kris7t.plugins.default_tolerance" | 53 | plugin "beancount_extras_kris7t.plugins.default_tolerance" |
@@ -66,7 +66,7 @@ class DefaultToleranceTest(cmptest.TestCase): | |||
66 | 2020-01-01 balance Assets:Checking 0 ~ 0 USD | 66 | 2020-01-01 balance Assets:Checking 0 ~ 0 USD |
67 | ''', entries) | 67 | ''', entries) |
68 | 68 | ||
69 | @loader.load_doc() | 69 | @load_doc() |
70 | def test_account_without_tolerance(self, entries, errors, options_map): | 70 | def test_account_without_tolerance(self, entries, errors, options_map): |
71 | ''' | 71 | ''' |
72 | plugin "beancount_extras_kris7t.plugins.default_tolerance" | 72 | plugin "beancount_extras_kris7t.plugins.default_tolerance" |
@@ -87,7 +87,7 @@ class DefaultToleranceTest(cmptest.TestCase): | |||
87 | 2020-01-02 balance Assets:Checking 10 ~ 20 USD | 87 | 2020-01-02 balance Assets:Checking 10 ~ 20 USD |
88 | ''', entries) | 88 | ''', entries) |
89 | 89 | ||
90 | @loader.load_doc(expect_errors=True) | 90 | @load_doc(expect_errors=True) |
91 | def test_account_with_invalid_tolerance(self, entries, errors, options_map): | 91 | def test_account_with_invalid_tolerance(self, entries, errors, options_map): |
92 | ''' | 92 | ''' |
93 | plugin "beancount_extras_kris7t.plugins.default_tolerance" | 93 | plugin "beancount_extras_kris7t.plugins.default_tolerance" |