Closed
Description
Describe the bug
According to docstrings for the convert_date method, illegal values should be returned as None. In fact, the method returns the original date value as string
To Reproduce
Code:
import pymysql.converters
pymysql.converters.convert_date('2007-02-31')
pymysql.converters.convert_date('0000-00-00')
Returned values are '2007-02-31' and '0000-00-00'
Expected behavior
According to the docstring, expected return values would be None:
>>> convert_date('2007-02-31') is None
True
>>> convert_date('0000-00-00') is None
True
Environment
- OS: Linux
- PyMySQL version: 1.0.2
Metadata
Metadata
Assignees
Labels
No labels