# -- encoding: UTF-8 --
"""
These tests do not verify any results and should not be run when
looking at improving test coverage.  They just verify that basic
operations don't fail due to odd corner cases on any locale that
we ship.
"""
import decimal
from datetime import datetime

import pytest
from babel import Locale
from babel import dates
from babel import numbers


@pytest.mark.all_locales
def test_smoke_dates(locale):
    locale = Locale.parse(locale)
    instant = datetime.now()
    for width in ("full", "long", "medium", "short"):
        assert dates.format_date(instant, format=width, locale=locale)
        assert dates.format_datetime(instant, format=width, locale=locale)
        assert dates.format_time(instant, format=width, locale=locale)


@pytest.mark.all_locales
def test_smoke_numbers(locale):
    locale = Locale.parse(locale)
    for number in (
        decimal.Decimal("-33.76"),  # Negative Decimal
        decimal.Decimal("13.37"),  # Positive Decimal
        1.2 - 1.0,  # Inaccurate float
        10,  # Plain old integer
        0,  # Zero
    ):
        assert numbers.format_decimal(number, locale=locale)

@@ -248,22 +248,8 @@
 mal%0A
-from datetime 
 impo
@@ -260,17 +260,16 @@
 atetime%0A
-%0A
 import p
@@ -274,16 +274,17 @@
  pytest%0A
+%0A
 from bab
@@ -303,58 +303,226 @@
 cale
-%0Afrom babel import dates%0Afrom babel import numbers
+, units, dates, numbers%0A%0ANUMBERS = (%0A    decimal.Decimal(%22-33.76%22),  # Negative Decimal%0A    decimal.Decimal(%2213.37%22),  # Positive Decimal%0A    1.2 - 1.0,  # Inaccurate float%0A    10,  # Plain old integer%0A    0,  # Zero%0A)
 %0A%0A%0A@
@@ -623,16 +623,25 @@
 stant = 
+datetime.
 datetime
@@ -918,16 +918,494 @@
 locale)%0A
+    # Interval test%0A    past = instant - datetime.timedelta(hours=23)%0A    assert dates.format_interval(past, instant, locale=locale)%0A    # Duration test - at the time of writing, all locales seem to have %60short%60 width,%0A    # so let's test that.%0A    duration = instant - instant.replace(hour=0, minute=0, second=0)%0A    for granularity in ('second', 'minute', 'hour', 'day'):%0A        assert dates.format_timedelta(duration, granularity=granularity, format=%22short%22, locale=locale)%0A
 %0A%0A@pytes
@@ -1507,17 +1507,24 @@
 mber in 
-(
+NUMBERS:
 %0A       
@@ -1528,207 +1528,472 @@
     
-decimal.Decimal(%22-33.76%22),  # Negative Decimal%0A        decimal.Decimal(%2213.37%22),  # Positive Decimal%0A        1.2 - 1.0,  # Inaccurate float%0A        10,  # Plain old integer%0A        0,  # Zero
+assert numbers.format_decimal(number, locale=locale)%0A        assert numbers.format_currency(number, %22EUR%22, locale=locale)%0A        assert numbers.format_scientific(number, locale=locale)%0A        assert numbers.format_percent(number / 100, locale=locale)%0A%0A%0A@pytest.mark.all_locales%0Adef test_smoke_units(locale):%0A    locale = Locale.parse(locale)%0A    for unit in ('length-meter', 'mass-kilogram', 'energy-calorie', 'volume-liter'):%0A        for number in NUMBERS:
 %0A    
-):%0A
     
@@ -1995,38 +1995,36 @@
          assert 
-number
+unit
 s.format_decimal
@@ -2012,38 +2012,58 @@
 nits.format_
-decimal(number
+unit(number, measurement_unit=unit
 , locale=loc

Make test_smoke more thorough