diff --git a/pyfeeds/testing.py b/pyfeeds/testing.py
index aef091b34294a69c119a96e3f33c36e79436d55f..780a55ae7660963bca0163803c8c59a5ae76bd80 100644
--- a/pyfeeds/testing.py
+++ b/pyfeeds/testing.py
@@ -450,6 +450,11 @@ def runTests(pyf):
     env               = os.environ.copy()
     env['PYTHONPATH'] = op.pathsep.join([thisDir, env.get('PYTHONPATH', '')])
 
+    # set PYFEEDS_TESTING=1 in case test scripts
+    # want to know whether they are being executed
+    # by pyfeeds or via some other mechanism.
+    env['PYFEEDS_TESTING'] = '1'
+
     # For each test we store a dictionary containing
     # the results of running the test. Each result
     # dict contains: