File diff b270db02e8d7 → d0f5f1547ced
tests/test_Configuration.py
Show inline comments
...
 
@@ -119,12 +119,21 @@ def test_good_date_parsing(date_s, expect_year, expect_month, expect_day):
 
    '2017/5.9',
 
    '2018-6/10',
 
    '1-2-3-4',
 
    '12/11/10',
 
])
 
def test_bad_date_parsing(date_s):
 
    try:
 
        config = config_from(os.devnull, ['historical', date_s])
 
    except SystemExit:
 
        pass
 
    else:
 
        assert not config.args.date, "date parsed from {!r}".format(date_s)
 

	
 
def test_ambiguous_arglist_failure():
 
    try:
 
        # It's ambiguous if "2" is "the 2nd" or "2 EUR".
 
        config = config_from(os.devnull, ['historical', '2', 'eur'])
 
    except SystemExit:
 
        pass
 
    else:
 
        assert not config.args, "ambiguous args parsed"