예제 #1
0
파일: test_biogen.py 프로젝트: shano/biogen
 def test_readme(self):
     sample_text = 'Here is some text'
     biogen.create_readme(self.newpath, sample_text)
     readme_path = os.path.join(self.newpath, 'readme.md')
     self.assertTrue(os.path.isfile(readme_path))
     with open (readme_path, "r") as myfile:
       contents=myfile.read()
     self.assertEqual(contents, sample_text)
예제 #2
0
파일: test_biogen.py 프로젝트: shano/biogen
    def test_readme(self):
        sample_text = """We say that Pattern is a most frequent k-mer in Text if it maximizes Count(Text, Pattern) among all k-mers. For example, "ACTAT" is a most frequent 5-mer in "ACAACTATGCATCACTATCGGGAACTATCCT", and "ATA" is a most frequent 3-mer of "CGATATATCCATAG".

Frequent Words Problem

Find the most frequent k-mers in a string.

Given: A DNA string Text and an integer k.

Return: All most frequent k-mers in Text (in any order)."""
        biogen.create_readme(self.newpath, sample_text)
        readme_path = os.path.join(self.newpath, 'readme.md')
        self.assertTrue(os.path.isfile(readme_path))
        with open (readme_path, "r") as myfile:
          contents=myfile.read()
        self.assertEqual(contents, sample_text)