Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  stubs.py   Sprache: Python

 
import os
import shutil
import tempfile

# stub file paths
files = [
    ("foo.txt",),
    (
        "foo",
        "bar.txt",
    ),
    (
        "foo",
        "bar",
        "fleem.txt",
    ),
    (
        "foobar",
        "fleem.txt",
    ),
    ("bar.txt",),
    (
        "nested_tree",
        "bar",
        "fleem.txt",
    ),
    ("readonly.txt",),
]


def create_empty_stub():
    tempdir = tempfile.mkdtemp()
    return tempdir


def create_stub(tempdir=None):
    """create a stub directory"""

    tempdir = tempdir or tempfile.mkdtemp()
    try:
        for path in files:
            fullpath = os.path.join(tempdir, *path)
            dirname = os.path.dirname(fullpath)
            if not os.path.exists(dirname):
                os.makedirs(dirname)
            contents = path[-1]
            f = open(fullpath, "w")
            f.write(contents)
            f.close()
        return tempdir
    except Exception:
        try:
            shutil.rmtree(tempdir)
        except Exception:
            pass
        raise

Messung V0.5
C=99 H=90 G=94

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge