code: def test_replay_capacity_checked(self):
      env, _ = self.make_env_and_successful_return(test=False)
      q_func = self.make_q_func(env)
      opt = self.make_optimizer(env, q_func)
      explorer = self.make_explorer(env)
      rbuf = pfrl.replay_buffers.ReplayBuffer(capacity=90)
      with pytest.raises(ValueError):
          self.make_dqn_agent(
              env=env,
              q_func=q_func,
              opt=opt,
              explorer=explorer,
              rbuf=rbuf,
              gpu=None,
          )
  
imports: import unittest
  import basetest_dqn_like
  import pytest
  import torch
  from basetest_training import _TestActorLearnerTrainingMixin, _TestBatchTrainingMixin
  import pfrl
  from pfrl.agents.dqn import DQN, compute_value_loss, compute_weighted_value_loss
label_desc: Use image node_id 2 for calling the TestDQNOnDiscreteABC obj's underlying member method code with example usage: obj.test_replay_capacity_checked() without return types