MilesCranmer commited on
Commit
9a7c989
1 Parent(s): 4d6fbca

Double default niterations in test

Browse files
Files changed (1) hide show
  1. test/test.py +7 -1
test/test.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import unittest
2
  from unittest.mock import patch
3
  import numpy as np
@@ -10,7 +11,12 @@ import pandas as pd
10
 
11
  class TestPipeline(unittest.TestCase):
12
  def setUp(self):
13
- self.default_test_kwargs = dict()
 
 
 
 
 
14
  np.random.seed(0)
15
  self.X = np.random.randn(100, 5)
16
 
 
1
+ import inspect
2
  import unittest
3
  from unittest.mock import patch
4
  import numpy as np
 
11
 
12
  class TestPipeline(unittest.TestCase):
13
  def setUp(self):
14
+ # Using inspect,
15
+ # get default niterations from PySRRegressor, and double them:
16
+ default_niterations = inspect.signature(PySRRegressor.__init__).parameters[
17
+ "niterations"
18
+ ].default
19
+ self.default_test_kwargs = dict(niterations=default_niterations * 2)
20
  np.random.seed(0)
21
  self.X = np.random.randn(100, 5)
22