From f8d465baccca3af9d57a93d9811cc58d73215167 Mon Sep 17 00:00:00 2001
From: Chichi Lalescu <Cristian.Lalescu@ds.mpg.de>
Date: Sat, 26 Dec 2015 22:38:48 +0100
Subject: [PATCH] update test_time_step

---
 tests/test_time_step.py | 16 ++++++++++++----
 tox_time_step.ini       | 30 ------------------------------
 2 files changed, 12 insertions(+), 34 deletions(-)
 delete mode 100644 tox_time_step.ini

diff --git a/tests/test_time_step.py b/tests/test_time_step.py
index fd1662c8..9a24619b 100644
--- a/tests/test_time_step.py
+++ b/tests/test_time_step.py
@@ -1,4 +1,3 @@
-#! /usr/bin/env python2
 #######################################################################
 #                                                                     #
 #  Copyright 2015 Max Planck Institute                                #
@@ -30,7 +29,7 @@ import h5py
 from mpl_toolkits.mplot3d import axes3d
 import matplotlib.pyplot as plt
 
-from test_base import *
+from base import *
 
 def convergence_test(
         opt,
@@ -93,10 +92,19 @@ def convergence_test(
     a.set_xscale('log')
     a.set_yscale('log')
     a.set_xlabel('$\\|u\\|_\\infty \\frac{\\Delta t}{\\Delta x}$')
-    fig.savefig('spec_err_vs_dt_{0}.pdf'.format(opt.precision))
+    fig.savefig('vel_err_vs_dt_{0}.pdf'.format(opt.precision))
     return None
 
 if __name__ == '__main__':
-    opt = parser.parse_args()
+    opt = parser.parse_args(
+            ['-n', '32',
+             '--run',
+             '--initialize',
+             '--ncpu', '2',
+             '--nparticles', '1000',
+             '--niter_todo', '16',
+             '--precision', 'single',
+             '--wd', 'data/single'] +
+            sys.argv[1:])
     convergence_test(opt, launch)
 
diff --git a/tox_time_step.ini b/tox_time_step.ini
deleted file mode 100644
index 87ec18d1..00000000
--- a/tox_time_step.ini
+++ /dev/null
@@ -1,30 +0,0 @@
-[tox]
-envlist = py27
-[testenv]
-whitelist_externals =
-    echo
-    cp
-passenv = LD_LIBRARY_PATH
-changedir =
-    {envtmpdir}
-commands =
-    cp -r {toxinidir}/tests {envtmpdir}
-    python tests/test_time_step.py \
-        -n 32 \
-        --run \
-        --initialize \
-        --ncpu 2 \
-        --nparticles 32 \
-        --niter_todo 16 \
-        --precision single \
-        --wd "data/single"
-    python tests/test_time_step.py \
-        -n 32 \
-        --run \
-        --initialize \
-        --ncpu 2 \
-        --nparticles 32 \
-        --niter_todo 16 \
-        --precision double \
-        --wd "data/double"
-
-- 
GitLab