forked from Rust-related/RustPython
Return arg in case of invalid param in strftime
Chrono panics in case of unsupported formats, this patch handles such cases and returns supplied format as a result.
This commit is contained in:
@@ -131,6 +131,11 @@ assert_raises(NotImplementedError, ne.tzname, dt)
|
||||
assert_raises(NotImplementedError, ne.utcoffset, dt)
|
||||
assert_raises(NotImplementedError, ne.dst, dt)
|
||||
|
||||
# unsupport format in strptime returns arg itself
|
||||
# in linux. Todo: add cases for Mac/Windows
|
||||
if sys.platform == 'linux':
|
||||
assert_equal(_time.strftime("%?"), "%?")
|
||||
|
||||
# XXX: bug #1302
|
||||
# def test_normal(self):
|
||||
#fo = FixedOffset(3, "Three")
|
||||
|
||||
Reference in New Issue
Block a user