From ca55ee9b03ab1b00eacd3bb9c122796930fa4b06 Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Fri, 30 Aug 2019 15:43:16 +0200
Subject: [PATCH] Bugfix in doctest of db.py

---
 pystencils/runhelper/db.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/pystencils/runhelper/db.py b/pystencils/runhelper/db.py
index acf5c6f..bc3aa0a 100644
--- a/pystencils/runhelper/db.py
+++ b/pystencils/runhelper/db.py
@@ -35,10 +35,12 @@ class Database:
         ...     assert next(db.filter_params(params))['params'] == params # get data set, keys are 'params', 'results'
         ...                                                               # and 'env'
         ...     # get a pandas object with all results matching a query
-        ...     db.to_pandas({'dx': 1.5}, remove_prefix=True)  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
-                             dx       method     error
-        pk
-        ...                 1.5  finite_diff  0.000001
+        ...     df = db.to_pandas({'dx': 1.5}, remove_prefix=True)
+        ...     # order columns alphabetically (just for doctest output)
+        ...     df.reindex(sorted(df.columns), axis=1)  # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
+                                 dx     error       method
+                pk
+                ...             1.5  0.000001  finite_diff
     """
 
     class SimulationResult(blitzdb.Document):
-- 
GitLab