Closed dhararon closed 6 years ago
I believe I am also running into this issue:
This test:
def test_replace(self):
d = Delorean(datetime=datetime.datetime(2015, 1, 1, 12, 15), timezone='UTC')
d.replace(hour=8)
assert Delorean(datetime=datetime.datetime(2015, 1, 1, 8, 15), timezone='UTC') == d
fails with this problem:
self = Delorean(datetime=datetime.datetime(2015, 1, 1, 12, 15), timezone='UTC')
name = 'replace'
def __getattr__(self, name):
"""
Implement __getattr__ to call `shift_date` function when function
called does not exist
"""
func_parts = name.split('_')
# is the func we are trying to call the right length?
if len(func_parts) != 2:
> raise AttributeError
E AttributeError
Python 3.6.1 :: Continuum Analytics, Inc
Delorean 0.6.0 (installed via pip
)
https://pypi.python.org/pypi/Delorean/1.0.0
I cut a new release with all the fixes! ✨
Hi @myusuf3,
I was trying to used "replace" function but the last pip package
0.6.0
does not exists that code.This line is missing: https://github.com/myusuf3/delorean/blob/master/delorean/dates.py#L553 But in the pip package is