Skip to content

Commit

Permalink
Merge branch 'release/v3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Aug 12, 2015
2 parents 268dddd + 19116e2 commit 8dc122a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
- TOX_ENV=py33
- TOX_ENV=py34

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
# command to install dependencies, e.g. pip install -r requirements.txt
install:
- pip install -r tests/requirements.txt
- pip install -e .
Expand Down
2 changes: 1 addition & 1 deletion mt940/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
statistics and manipulation.
'''.strip()
__email__ = 'wolph@wol.ph'
__version__ = '3.0'
__version__ = '3.1'
__license__ = 'BSD'
__copyright__ = 'Copyright 2015 Rick van Hattem (wolph)'
__url__ = 'https://github.com/WoLpH/mt940'
Expand Down
3 changes: 2 additions & 1 deletion mt940/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def parse(self, data):
# The pattern is a bit annoying to match by regex, even with a greedy
# match it's difficult to get both the beginning and the end so we're
# working around it in a safer way to get everything.
tag_re = re.compile(r':(?P<tag>[0-9]{2})(?P<sub_tag>[A-Z])?:')
tag_re = re.compile(r'^:(?P<tag>[0-9]{2})(?P<sub_tag>[A-Z])?:',
re.MULTILINE)
matches = list(tag_re.finditer(data))

transaction = Transaction(self)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_sta_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ def compare(a, b):
raise TypeError('Unsupported type %s' % type(a))


@pytest.mark.parametrize('input', get_sta_files())
def test_parse(input):
transactions = mt940.parse(input)
expected = get_yaml_data(input)
@pytest.mark.parametrize('input_', get_sta_files())
def test_parse(input_):
transactions = mt940.parse(input_)
expected = get_yaml_data(input_)

assert len(transactions) >= 0
repr(transactions)
Expand Down

0 comments on commit 8dc122a

Please sign in to comment.