Beispiel #1
0
# IMPORTS
#---------------------------------------

from os import path

import test

from pymake2 import *

#---------------------------------------
# CONSTANTS
#---------------------------------------

FILENAME = 'tempfile.xyz'

#---------------------------------------
# SCRIPT
#---------------------------------------

try:
    with open(FILENAME, 'w') as f:
        f.write('foo')
except:
    test.fail("could not write to file")

test.true(path.exists(FILENAME) and path.isfile(FILENAME), "temp should exist")
test.true(delete_file(FILENAME), "could not delete file")
test.false(path.exists(FILENAME) and path.isfile(FILENAME), "temp file found")

test.success()
Beispiel #2
0
def my_target2(conf):
    test.equal(conf.foo, 'abc', "conf.foo should equal 'abc'")
    test.success()
Beispiel #3
0
def my_target(conf):
    test.equal(conf.abc, '123', "conf.abc should equal 123")
    test.success()
Beispiel #4
0
def my_target(conf):
    test.success()