Esempio n. 1
0
def test_existing_file_is_ok():
    'If some skeleton files already exist, init should quietly skip them.'
    banana = 'I am a banana.'
    setup()
    open('readme.md', 'w').write(banana)
    init.readme()
    n.assert_equal(open('readme.md').read(), banana)
Esempio n. 2
0
def test_existing_file_is_ok():
    "If some skeleton files already exist, init should quietly skip them."
    banana = "I am a banana."
    setup()
    open("readme.md", "w").write(banana)
    init.readme()
    n.assert_equal(open("readme.md").read(), banana)
Esempio n. 3
0
def test_readme():
    "A readme should be created with the appropriate sections."
    setup()
    init.readme()
    yield n.assert_true, os.path.isfile("readme.md")
    readme = open("readme.md").read()
    for section in ["Overview", "References", "Goals", "Assignment", "Extra Credit", "Glossary"]:
        yield n.assert_in, "\n## %s" % section, readme
Esempio n. 4
0
def test_readme():
    'A readme should be created with the appropriate sections.'
    setup()
    init.readme()
    yield n.assert_true, os.path.isfile('readme.md')
    readme = open('readme.md').read()
    for section in [
            'Overview', 'References', 'Goals', 'Assignment', 'Extra Credit',
            'Glossary'
    ]:
        yield n.assert_in, '\n## %s' % section, readme