aboutsummaryrefslogtreecommitdiffstats
path: root/datamaps
diff options
context:
space:
mode:
Diffstat (limited to 'datamaps')
-rw-r--r--datamaps/__init__.py2
-rw-r--r--datamaps/plugins/dft/master.py5
-rw-r--r--datamaps/tests/test_api.py7
3 files changed, 12 insertions, 2 deletions
diff --git a/datamaps/__init__.py b/datamaps/__init__.py
index 1436d8f..bf78826 100644
--- a/datamaps/__init__.py
+++ b/datamaps/__init__.py
@@ -1 +1 @@
-__version__ = "1.1.6"
+__version__ = "1.1.7"
diff --git a/datamaps/plugins/dft/master.py b/datamaps/plugins/dft/master.py
index 324b63d..edd79ee 100644
--- a/datamaps/plugins/dft/master.py
+++ b/datamaps/plugins/dft/master.py
@@ -272,4 +272,7 @@ class Master:
return False
def __repr__(self):
- return f"Master({self.path}, {self.quarter.quarter}, {self.quarter.year})"
+ if self._declared_month:
+ return f"Master for {self.month} - {self.month.year}({self.path}, {self.quarter.quarter}, {self.quarter.year})"
+ else:
+ return f"Master({self.path}, {self.quarter.quarter}, {self.quarter.year})"
diff --git a/datamaps/tests/test_api.py b/datamaps/tests/test_api.py
index 295f1fb..04a6805 100644
--- a/datamaps/tests/test_api.py
+++ b/datamaps/tests/test_api.py
@@ -19,6 +19,13 @@ def test_get_project_data_using_month(master):
m3 = project_data_from_master_month(master, 9, 2021)
m4 = project_data_from_master_month(master, 10, 2021)
m5 = project_data_from_master_month(master, 2, 2021) # this is q4
+ m6 = project_data_from_master_month(master, 5, 2030) # this is q4
+ assert "Master for Month(July) - 2021" in repr(m)
+ assert "Master for Month(August) - 2021" in repr(m2)
+ assert "Master for Month(September) - 2021" in repr(m3)
+ assert "Master for Month(October) - 2021" in repr(m4)
+ assert "Master for Month(February) - 2021" in repr(m5)
+ assert "Master for Month(May) - 2030" in repr(m6)
assert m["Chutney Bridge.xlsm"]["Project/Programme Name"] == "Chutney Bridge Ltd"
assert isinstance(m.month, Month)
assert m.month.name == "July"