exchange_rate: prefer relative imports (#4308)
As this project is currently structured, absolute imports have the drawback that they'll load modules from installed paths rather then from the local repo when running unit tests. This somehow breaks the main idea of unit tests which is being able to quickly test newest development changes. Therefore, use a relative import here.
This commit is contained in:
committed by
ghost43
parent
e90a31ef23
commit
376a815458
@@ -569,6 +569,6 @@ class FxThread(ThreadJob):
|
||||
return self.fiat_value(satoshis, self.history_rate(d_t))
|
||||
|
||||
def timestamp_rate(self, timestamp):
|
||||
from electrum.util import timestamp_to_datetime
|
||||
from .util import timestamp_to_datetime
|
||||
date = timestamp_to_datetime(timestamp)
|
||||
return self.history_rate(date)
|
||||
|
||||
Reference in New Issue
Block a user