|
GnuCash 7574033+
|
Public Member Functions | |
| setUp (self) | |
| tearDown (self) | |
| test_canonical_source_is_accepted (self) | |
| test_unknown_source_on_fresh_price_raises (self) | |
| test_unknown_source_does_not_clobber_existing (self) | |
| test_emits_deprecation_warning (self) | |
Protected Attributes | |
| _warn_ctx = warnings.catch_warnings() | |
Additional Inherited Members | |
| Data Fields inherited from test_price_and_wrapping.PriceSession | |
| ses = Session() | |
| book = self.ses.get_book() | |
| table = self.book.get_table() | |
| usd = self.table.lookup("CURRENCY", "USD") | |
| test_comm | |
| pricedb = self.book.get_price_db() | |
| price1 = GncPrice(self.book) | |
| price2 = GncPrice(self.book) | |
set_source_string() is deprecated in favour of set_source(PriceSource.*), but while it exists it must fail loud on an unrecognized source string instead of silently leaving the source unchanged (the C setter no-ops). These tests ignore the DeprecationWarning and check the guard behaviour; the warning itself is covered by test_emits_deprecation_warning.
Definition at line 495 of file test_price_and_wrapping.py.
| test_price_and_wrapping.TestSetSourceStringGuard.setUp | ( | self | ) |
Reimplemented from test_price_and_wrapping.PriceSession.
Definition at line 502 of file test_price_and_wrapping.py.
| test_price_and_wrapping.TestSetSourceStringGuard.tearDown | ( | self | ) |
Reimplemented from test_price_and_wrapping.PriceSession.
Definition at line 509 of file test_price_and_wrapping.py.
| test_price_and_wrapping.TestSetSourceStringGuard.test_canonical_source_is_accepted | ( | self | ) |
Definition at line 513 of file test_price_and_wrapping.py.
| test_price_and_wrapping.TestSetSourceStringGuard.test_emits_deprecation_warning | ( | self | ) |
Definition at line 531 of file test_price_and_wrapping.py.
| test_price_and_wrapping.TestSetSourceStringGuard.test_unknown_source_does_not_clobber_existing | ( | self | ) |
Definition at line 522 of file test_price_and_wrapping.py.
| test_price_and_wrapping.TestSetSourceStringGuard.test_unknown_source_on_fresh_price_raises | ( | self | ) |
Definition at line 517 of file test_price_and_wrapping.py.
|
protected |
Definition at line 505 of file test_price_and_wrapping.py.