Changeset - 8dd611c66953
[Not reviewed]
0 1 0
Brett Smith - 4 years ago 2020-03-17 21:47:23
brettcsmith@brettcsmith.org
tests: Remove unused import.
1 file changed with 0 insertions and 1 deletions:
0 comments (0 inline, 0 general)
tests/test_data_iter_postings.py
Show inline comments
...
 
@@ -9,25 +9,24 @@
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU Affero General Public License for more details.
 
#
 
# You should have received a copy of the GNU Affero General Public License
 
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 

	
 
import pytest
 

	
 
from . import testutil
 

	
 
from beancount.core import data as bc_data
 
from conservancy_beancount import data
 

	
 
@pytest.fixture
 
def simple_txn(index=None, key=None):
 
    return testutil.Transaction(note='txn note', postings=[
 
        ('Assets:Cash', 5),
 
        ('Income:Donations', -5, {'note': 'donation love', 'extra': 'Extra'}),
 
    ])
 

	
 
def test_iter_postings(simple_txn):
 
    for source, post in zip(simple_txn.postings, data.iter_postings(simple_txn)):
 
        assert all(source[x] == post[x] for x in range(len(source) - 1))
0 comments (0 inline, 0 general)