Browse Source

pygrass: remove failing test as not useful, fix history __repr__ function (#1411)

Anna Petrasova 4 years ago
parent
commit
fd92e673b6

+ 1 - 1
python/grass/pygrass/raster/history.py

@@ -52,7 +52,7 @@ class History(object):
 
     def __repr__(self):
         return "History(%s)" % ", ".join(
-            ["%s=%r" % (self.attr, getattr(self, attr)) for attr in self.attrs]
+            ["%s=%r" % (attr, getattr(self, attr)) for attr in self.attrs]
         )
 
     def __del__(self):

+ 0 - 4
python/grass/pygrass/raster/testsuite/test_history.py

@@ -78,10 +78,6 @@ class RasterHistoryTestCate(TestCase):
         self.assertEqual(decode(hist.src2), "No such source 2")
         r.close()
 
-        hist1 = History("no_map")
-        hist1.command()
-        self.assertEqual(decode(hist1.line(0)), "test_history.py")
-
 
 if __name__ == "__main__":
     test()