diff --git a/src/bindings/python/SConscript b/src/bindings/python/SConscript
index 5d7887528bc20ee729dd5d65e18e712ffbacf8bb..0f1e9a92e5215fcb03547a3e075411e36bf2a949 100644
--- a/src/bindings/python/SConscript
+++ b/src/bindings/python/SConscript
@@ -20,9 +20,10 @@ Default(libhammer_python)
 
 pytestenv = pythonenv.Clone()
 pytestenv['ENV']['LD_LIBRARY_PATH'] = os.path.dirname(str(libhammer_shared[0]))
-pytestexec = pytestenv.Command(None, ['hammer_tests.py'] + libhammer_python, "nosetests -vv $SOURCE")
+pytests = ['hammer_tests.py']
+pytestexec = pytestenv.Command(['hammer.pyc', 'hammer_tests.pyc'], pytests + libhammer_python, "nosetests -vv $SOURCE")
 pytest = Alias("testpython", [pytestexec], pytestexec)
 AlwaysBuild(pytest)
 testruns.append(pytest)
 
-Clean('.', ['hammer.pyc', 'hammer_tests.py', 'hammer_tests.pyc']) 
+