diff options
Diffstat (limited to 'beancount_extras_kris7t/plugins/selective_implicit_prices_test.py')
-rw-r--r-- | beancount_extras_kris7t/plugins/selective_implicit_prices_test.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/beancount_extras_kris7t/plugins/selective_implicit_prices_test.py b/beancount_extras_kris7t/plugins/selective_implicit_prices_test.py index 6ead45d..b4a9d8e 100644 --- a/beancount_extras_kris7t/plugins/selective_implicit_prices_test.py +++ b/beancount_extras_kris7t/plugins/selective_implicit_prices_test.py | |||
@@ -6,15 +6,15 @@ import unittest | |||
6 | 6 | ||
7 | from beancount.core.number import D | 7 | from beancount.core.number import D |
8 | from beancount.core import data | 8 | from beancount.core import data |
9 | from beancount.loader import load_doc | ||
9 | from beancount.parser import cmptest | 10 | from beancount.parser import cmptest |
10 | from beancount import loader | ||
11 | 11 | ||
12 | from beancount_extras_kris7t.plugins import selective_implicit_prices as implicit_prices | 12 | from beancount_extras_kris7t.plugins import selective_implicit_prices as implicit_prices |
13 | 13 | ||
14 | 14 | ||
15 | class TestImplicitPrices(cmptest.TestCase): | 15 | class TestImplicitPrices(cmptest.TestCase): |
16 | 16 | ||
17 | @loader.load_doc() | 17 | @load_doc() |
18 | def test_add_implicit_prices__all_cases(self, entries, _, options_map): | 18 | def test_add_implicit_prices__all_cases(self, entries, _, options_map): |
19 | """ | 19 | """ |
20 | 1702-04-02 commodity USD | 20 | 1702-04-02 commodity USD |
@@ -124,7 +124,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
124 | actual = (price.currency, price.amount.currency, price.amount.number) | 124 | actual = (price.currency, price.amount.currency, price.amount.number) |
125 | self.assertEqual(expected, actual) | 125 | self.assertEqual(expected, actual) |
126 | 126 | ||
127 | @loader.load_doc() | 127 | @load_doc() |
128 | def test_add_implicit_prices__other_account(self, entries, errors, options_map): | 128 | def test_add_implicit_prices__other_account(self, entries, errors, options_map): |
129 | """ | 129 | """ |
130 | 2013-01-01 commodity HOOL | 130 | 2013-01-01 commodity HOOL |
@@ -185,7 +185,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
185 | 185 | ||
186 | """, new_entries) | 186 | """, new_entries) |
187 | 187 | ||
188 | @loader.load_doc() | 188 | @load_doc() |
189 | def test_add_implicit_prices__duplicates_on_same_transaction(self, | 189 | def test_add_implicit_prices__duplicates_on_same_transaction(self, |
190 | entries, _, options_map): | 190 | entries, _, options_map): |
191 | """ | 191 | """ |
@@ -234,7 +234,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
234 | 234 | ||
235 | """, new_entries) | 235 | """, new_entries) |
236 | 236 | ||
237 | @loader.load_doc() | 237 | @load_doc() |
238 | def test_add_implicit_prices__duplicates_on_different_transactions(self, | 238 | def test_add_implicit_prices__duplicates_on_different_transactions(self, |
239 | entries, _, | 239 | entries, _, |
240 | options_map): | 240 | options_map): |
@@ -296,7 +296,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
296 | 296 | ||
297 | """, new_entries) | 297 | """, new_entries) |
298 | 298 | ||
299 | @loader.load_doc() | 299 | @load_doc() |
300 | def test_add_implicit_prices__duplicates_overloaded(self, entries, _, options_map): | 300 | def test_add_implicit_prices__duplicates_overloaded(self, entries, _, options_map): |
301 | """ | 301 | """ |
302 | 2013-01-01 commodity HOOL | 302 | 2013-01-01 commodity HOOL |
@@ -343,7 +343,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
343 | 343 | ||
344 | """, new_entries) | 344 | """, new_entries) |
345 | 345 | ||
346 | @loader.load_doc() | 346 | @load_doc() |
347 | def test_add_implicit_prices__not_enabled(self, entries, errors, options_map): | 347 | def test_add_implicit_prices__not_enabled(self, entries, errors, options_map): |
348 | """ | 348 | """ |
349 | 2013-01-01 open Assets:Account1 | 349 | 2013-01-01 open Assets:Account1 |
@@ -363,7 +363,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
363 | Assets:Other -780000 USD | 363 | Assets:Other -780000 USD |
364 | """, new_entries) | 364 | """, new_entries) |
365 | 365 | ||
366 | @loader.load_doc() | 366 | @load_doc() |
367 | def test_add_implicit_prices__disabled(self, entries, errors, options_map): | 367 | def test_add_implicit_prices__disabled(self, entries, errors, options_map): |
368 | """ | 368 | """ |
369 | 2013-01-01 commodity HOOL | 369 | 2013-01-01 commodity HOOL |
@@ -389,7 +389,7 @@ class TestImplicitPrices(cmptest.TestCase): | |||
389 | Assets:Other -780000 USD | 389 | Assets:Other -780000 USD |
390 | """, new_entries) | 390 | """, new_entries) |
391 | 391 | ||
392 | @loader.load_doc() | 392 | @load_doc() |
393 | def test_add_implicit_prices__invalid(self, entries, errors, options_map): | 393 | def test_add_implicit_prices__invalid(self, entries, errors, options_map): |
394 | """ | 394 | """ |
395 | 2013-01-01 commodity HOOL | 395 | 2013-01-01 commodity HOOL |