From 53c4749321c7a4e94d41d71a7e75529608ccffc8 Mon Sep 17 00:00:00 2001 From: Elmom Date: Tue, 19 Oct 2010 23:44:06 +0300 Subject: [PATCH] removed file that was really moved --- test_compile.py | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 test_compile.py diff --git a/test_compile.py b/test_compile.py deleted file mode 100644 index 64d96c7..0000000 --- a/test_compile.py +++ /dev/null @@ -1,49 +0,0 @@ -import py - -from openscad_utils import * - - -temppath = py.test.ensuretemp('MCAD') - -def pytest_generate_tests(metafunc): - if "modpath" in metafunc.funcargnames: - for fpath, modnames in collect_test_modules().items(): - #os.system("cp %s %s/" % (fpath, temppath)) - if "modname" in metafunc.funcargnames: - for modname in modnames: - metafunc.addcall(funcargs=dict(modname=modname, modpath=fpath)) - else: - metafunc.addcall(funcargs=dict(modpath=fpath)) - - -def test_module_compile(modname, modpath): - tempname = modpath.basename + '-' + modname + '.scad' - fpath = temppath.join(tempname) - stlpath = temppath.join(tempname + ".stl") - f = fpath.open('w') - code = """ -//generated testfile -use <%s> - -%s(); -""" % (modpath, modname) - print code - f.write(code) - f.flush() - output = call_openscad(path=fpath, stlpath=stlpath, timeout=15) - print output - assert output[0] is 0 - for s in ("warning", "error"): - assert s not in output[2].strip().lower() - assert len(stlpath.readlines()) > 2 - -def test_file_compile(modpath): - stlpath = temppath.join(modpath.basename + "-test.stl") - output = call_openscad(path=modpath, stlpath=stlpath) - print output - assert output[0] is 0 - for s in ("warning", "error"): - assert s not in output[2].strip().lower() - assert len(stlpath.readlines()) == 2 - -