def test__sampling_period(self):
        result1 = self.train1.sampling_period

        self.train1.sampling_rate = None
        assert_neo_object_is_compliant(self.train1)
        result2 = self.train1.sampling_period

        self.train1.sampling_rate = self.sampling_rate1
        self.train1.sampling_period = 10.*pq.ms
        assert_neo_object_is_compliant(self.train1)
        result3a = self.train1.sampling_period
        result3b = self.train1.sampling_rate

        self.train1.sampling_period = None
        result4a = self.train1.sampling_period
        result4b = self.train1.sampling_rate

        self.assertEqual(result1, 10./pq.Hz)
        self.assertEqual(result1.units, 1./pq.Hz)
        self.assertEqual(result2, None)
        self.assertEqual(result3a, 10.*pq.ms)
        self.assertEqual(result3a.units, 1.*pq.ms)
        self.assertEqual(result3b, .1/pq.ms)
        self.assertEqual(result3b.units, 1./pq.ms)
        self.assertEqual(result4a, None)
        self.assertEqual(result4b, None)
dataset/ETHPy150Open NeuralEnsemble/python-neo/neo/test/coretest/test_spiketrain.py/TestPropertiesMethods.test__sampling_period/original