docstr: ...Test LinearRegression setting of random_state parameter of solver
          
docstr_tok: ["...","Test","LinearRegression","setting","of","random_state","parameter","of","solver"]
code: def test_LinearRegression_solver_random_state(self):
      """...Test LinearRegression setting of random_state parameter of solver"""
      for solver in LinearRegression._solvers.keys():
          if solver in ["agd", "gd"]:
              msg = (
                  '^Solver "%s" has no settable random_state$' % solver
              )
              with self.assertWarnsRegex(RuntimeWarning, msg):
                  learner = LinearRegression(
                      solver=solver,
                      random_state=1,
                      **Test.specific_solver_kwargs(solver),
                  )
                  self.assertIsNone(learner.random_state)
          else:
              learner = LinearRegression(
                  solver=solver,
                  random_state=self.int_1,
                  **Test.specific_solver_kwargs(solver),
              )
              self.assertEqual(learner.random_state, self.int_1)
              self.assertEqual(learner._solver_obj.seed, self.int_1)
  
              msg = "^random_state must be positive, got -1$"
              with self.assertRaisesRegex(ValueError, msg):
                  LinearRegression(
                      solver=solver,
                      random_state=-1,
                      **Test.specific_solver_kwargs(solver),
                  )
  
          msg = "^random_state is readonly in LinearRegression$"
          with self.assertRaisesRegex(AttributeError, msg):
              learner = LinearRegression(
                  solver=solver, **Test.specific_solver_kwargs(solver)
              )
              learner.random_state = self.int_2
  
imports: import itertools
  import unittest
  from itertools import product
  import numpy
  from scipy.linalg import norm
  from tick.base.inference import InferenceTest
  from tick.linear_model import SimuLinReg, LinearRegression
  from tick.simulation import weights_sparse_gauss
label_desc: Use image node_id 12 for calling the Test obj's underlying member method code with example usage: obj.test_LinearRegression_solver_random_state() without return types