#NEWLINE# def test__sampling_period( self ) : #NEWLINE# #INDENT# result1 = self . spike1 . sampling_period #NEWLINE# self . spike1 . sampling_rate = None #NEWLINE# assert_neo_object_is_compliant ( self . spike1 ) #NEWLINE# result2 = self . spike1 . sampling_period #NEWLINE# self . spike1 . sampling_rate = self . sampling_rate1 #NEWLINE# self . spike1 . sampling_period = ( 10.0 * pq . ms ) #NEWLINE# assert_neo_object_is_compliant ( self . spike1 ) #NEWLINE# result3a = self . spike1 . sampling_period #NEWLINE# result3b = result4a . spike1 . sampling_rate #NEWLINE# self . spike1 . sampling_period = None #NEWLINE# result4a = self . spike1 . sampling_period #NEWLINE# result4b = self . spike1 . sampling_rate #NEWLINE# self . assertEqual ( result1 , ( 10.0 / pq . Hz ) ) #NEWLINE# self . assertEqual ( result1 . units , ( 1.0 / pq . Hz ) ) #NEWLINE# self . assertEqual ( result2 , None ) #NEWLINE# self . assertEqual ( result3a , ( 10.0 * pq . ms ) ) #NEWLINE# self . assertEqual ( result3a . units , ( 1.0 * pq . ms ) ) #NEWLINE# self . assertEqual ( result3b , ( 0.1 / pq . ms ) ) #NEWLINE# self . assertEqual ( result3b . units , ( 1.0 / pq . ms ) ) #NEWLINE# self . assertEqual ( result4a , None ) #NEWLINE# self . assertEqual ( result4b , None )