|  | @@ -119,11 +119,16 @@ def test_parse_text_fail(text):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @pytest.mark.parametrize(('haystack', 'expected_needles'), [
 | 
	
		
			
				|  |  | -    ["Preis: 0,50 €", [{'currency': '€', 'value': '0,50'}]],
 | 
	
		
			
				|  |  |      ["Preis: 0,50 US$", [{'currency': 'US$', 'value': '0,50'}]],
 | 
	
		
			
				|  |  | +    ["Preis: 0,50 €", [{'currency': '€', 'value': '0,50'}]],
 | 
	
		
			
				|  |  |      ["Preis: 1234 ¥", [{'currency': '¥', 'value': '1234'}]],
 | 
	
		
			
				|  |  | -    ["price: 1.23 €", [{'currency': '€', 'value': '1.23'}]],
 | 
	
		
			
				|  |  | +    ["Preis: US$ 0,50", []],
 | 
	
		
			
				|  |  | +    ["Preis: € 0,50", []],
 | 
	
		
			
				|  |  | +    ["Preis: ¥1234", []],
 | 
	
		
			
				|  |  |      ["price: 1.23 US$", [{'currency': 'US$', 'value': '1.23'}]],
 | 
	
		
			
				|  |  | +    ["price: 1.23 €", [{'currency': '€', 'value': '1.23'}]],
 | 
	
		
			
				|  |  | +    ["price: US$ 1.23", []],
 | 
	
		
			
				|  |  | +    ["price: €1.23", []],
 | 
	
		
			
				|  |  |  ])
 | 
	
		
			
				|  |  |  def test_sum_regex_value_first(haystack, expected_needles):
 | 
	
		
			
				|  |  |      matches = re.finditer(
 | 
	
	
		
			
				|  | @@ -131,3 +136,18 @@ def test_sum_regex_value_first(haystack, expected_needles):
 | 
	
		
			
				|  |  |          haystack,
 | 
	
		
			
				|  |  |      )
 | 
	
		
			
				|  |  |      assert expected_needles == [m.groupdict() for m in matches]
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +@pytest.mark.parametrize(('haystack', 'expected_needles'), [
 | 
	
		
			
				|  |  | +    ["Preis: US$ 0,50", [{'currency': 'US$', 'value': '0,50'}]],
 | 
	
		
			
				|  |  | +    ["Preis: € 0,50", [{'currency': '€', 'value': '0,50'}]],
 | 
	
		
			
				|  |  | +    ["Preis: ¥1234", [{'currency': '¥', 'value': '1234'}]],
 | 
	
		
			
				|  |  | +    ["price: US$ 1.23", [{'currency': 'US$', 'value': '1.23'}]],
 | 
	
		
			
				|  |  | +    ["price: €1.23", [{'currency': '€', 'value': '1.23'}]],
 | 
	
		
			
				|  |  | +])
 | 
	
		
			
				|  |  | +def test_sum_regex_currency_first(haystack, expected_needles):
 | 
	
		
			
				|  |  | +    matches = re.finditer(
 | 
	
		
			
				|  |  | +        finoex.Sum.sum_regex_currency_first,
 | 
	
		
			
				|  |  | +        haystack,
 | 
	
		
			
				|  |  | +    )
 | 
	
		
			
				|  |  | +    assert expected_needles == [m.groupdict() for m in matches]
 |