text: '''
  PyPDC - Unit Test
  '''
  
  import unittest
  import numpy as np
  import pypdc
  from pypdc.analysis import *
  
  
  y = np.array([[1936, 1.0, 0.9,  40],
             [1937, 0.8, 0.8, 115],
             [1938, 0.8, 0.8, 100],
             [1939, 1.4, 1.3,  80],
             [1940, 1.2, 1.4,  60],
             [1941, 1.0, 1.2,  40],
             [1942, 1.5, 1.7,  23],
             [1943, 1.9, 1.8,  10],
             [1944, 1.5, 1.6,  10],
             [1945, 1.5, 1.5,  25],
             [1946, 1.5, 1.5,  75],
             [1947, 1.6, 2.0, 145],
             [1948, 1.8, 2.5, 130],
             [1949, 2.8, 2.7, 130],
             [1950, 2.5, 2.9,  80],
             [1951, 2.5, 2.5,  65],
             [1952, 2.4, 3.1,  20],
             [1953, 2.1, 2.4,  10],
             [1954, 1.9, 2.2,   5],
             [1955, 2.4, 2.9,  10],
             [1956, 2.4, 2.5,  60],
             [1957, 2.6, 2.6, 190],
             [1958, 2.6, 3.2, 180],
             [1959, 4.4, 3.8, 175],
             [1960, 4.2, 4.2, 120],
             [1961, 3.8, 3.9,  50],
             [1962, 3.4, 3.7,  35],
             [1963, 3.6, 3.3,  20],
             [1964, 4.1, 3.7,  10],
             [1965, 3.7, 3.9,  15],
             [1966, 4.2, 4.1,  30],
             [1967, 4.1, 3.8,  60],
             [1968, 4.1, 4.7, 105],
             [1969, 4.0, 4.4, 105],
             [1970, 5.2, 4.8, 105],
             [1971, 5.3, 4.8,  80],
             [1972, 5.3, 4.8,  65]])
             
  data = y[:, [3, 2]].transpose()
  
  
  M = pdc_matrix_ci(data, maxp=10, nf1=1, nf2=63, ss=True,
                     alpha=0.01, metric='info', normalize=False,
                     stat='asymp', n_boot=100)
  
  A = np.matrix([[0.95369084, 0.33145567],
                 [0.80537803, 0.99342949]])
  
  
  class TestPDC(unittest.TestCase):
     
      def test_pdc_matrix_ci(self):
          self.assertTrue(np.allclose(A, M, rtol=1e-08, atol=1e-09))
          
          
  
  if __name__ == '__main__':
      unittest.main(argv=['first-arg-is-ignored'], exit=False)