mercredi 23 septembre 2015

How to test a function that creates a directory?

How to test a function in Python which creates a directory? Can you give an example make_directory_test() function?

def make_directory(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)

Aucun commentaire:

Enregistrer un commentaire