We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ca6529 commit f183d26Copy full SHA for f183d26
tests/test_simple.py
@@ -21,6 +21,22 @@ def testEnvironment(self):
21
self.assertIn(envVar, os.environ)
22
self.assertTrue(os.path.exists(os.environ[envVar]), f"Check path {os.environ[envVar]}")
23
24
+ def testNoImplicitMultithreading(self):
25
+ """Test that the environment has turned off implicit
26
+ multithreading.
27
+ """
28
+ envVar = "OMP_NUM_THREADS"
29
+ self.assertIn(envVar, os.environ)
30
+ self.assertEqual(os.environ[envVar], "1")
31
+
32
+ try:
33
+ import numexpr
34
+ except ImportError:
35
+ numexpr = None
36
37
+ if numexpr:
38
+ self.assertEqual(numexpr.utils.get_num_threads(), 1)
39
40
41
if __name__ == "__main__":
42
unittest.main()
0 commit comments