Skip to content

Commit

Permalink
fix test to use new module name
Browse files Browse the repository at this point in the history
  • Loading branch information
kvoss committed Sep 17, 2021
1 parent 8f04652 commit f35fe9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions testit.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/sh

echo "=> Running sanity tests.."
python3 -c 'import cbench as cb
python3 -c 'import optobench as ob
xs = [0.1, 0.2, 0.3, 0.4, 0.51]
for el in dir(cb):
for el in dir(ob):
if el.startswith("_"):
continue
print(f"-> {el}: ", end="", flush=True)
fn = getattr(cb, el)
fn = getattr(ob, el)
if el == "hartmann_6d":
ans = fn([0.1, 0.2, 0.3, 0.4, 0.51, 0.63])
else:
Expand All @@ -21,5 +21,5 @@ echo "=> Differences:"
diff -u sanity-test-golden.log sanity-test-instance.log

# echo "Timing test.."
# python -m timeit -s 'from cbench import michalewicz; xs = [0.1, 0.2, 0.3, 0.4, 0.51]' 'michalewicz(xs)'
# python -m timeit -s 'from obench import michalewicz; xs = [0.1, 0.2, 0.3, 0.4, 0.51]' 'michalewicz(xs)'
echo "=> Done."

0 comments on commit f35fe9b

Please sign in to comment.