From 376a815458d7765c3e3b4c22b74552bd4702b163 Mon Sep 17 00:00:00 2001 From: Filip Gospodinov Date: Wed, 25 Apr 2018 09:42:07 +0200 Subject: [PATCH] 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. --- lib/exchange_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exchange_rate.py b/lib/exchange_rate.py index ef2b9478d..befd54c0c 100644 --- a/lib/exchange_rate.py +++ b/lib/exchange_rate.py @@ -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)