def test__create_with_times_outside_tstart_tstop_ValueError(self):
        t_start = 23
        t_stop = 77
        train1 = SpikeTrain(np.arange(t_start, t_stop), units='ms',
                            t_start=t_start, t_stop=t_stop)
        train2 = _new_spiketrain(SpikeTrain,
                                 np.arange(t_start, t_stop), units='ms',
                                 t_start=t_start, t_stop=t_stop)
        assert_neo_object_is_compliant(train1)
        assert_neo_object_is_compliant(train2)
        self.assertRaises(ValueError, SpikeTrain,
                          np.arange(t_start-5, t_stop), units='ms',
                          t_start=t_start, t_stop=t_stop)
        self.assertRaises(ValueError, _new_spiketrain, SpikeTrain,
                          np.arange(t_start-5, t_stop), units='ms',
                          t_start=t_start, t_stop=t_stop)
        self.assertRaises(ValueError, SpikeTrain,
                          np.arange(t_start, t_stop+5), units='ms',
                          t_start=t_start, t_stop=t_stop)
        self.assertRaises(ValueError, _new_spiketrain, SpikeTrain,
                          np.arange(t_start, t_stop+5), units='ms',
                          t_start=t_start, t_stop=t_stop)
dataset/ETHPy150Open NeuralEnsemble/python-neo/neo/test/coretest/test_spiketrain.py/TestConstructor.test__create_with_times_outside_tstart_tstop_ValueError/original