Commit 2702c276 by Ben Patterson

WIP...includes nose breakages so you want to revert this.

parent 5d250891
......@@ -2,7 +2,7 @@
Javascript test tasks
"""
import sys
from paver.easy import task, cmdopts, needs
from paver.easy import task, consume_args, cmdopts, needs
from pavelib.utils.test.suites import JsTestSuite
from pavelib.utils.envs import Env
......
......@@ -32,6 +32,7 @@ class JsTestSuite(TestSuite):
def __enter__(self):
super(JsTestSuite, self).__enter__()
self.report_dir.makedirs_p()
from nose.tools import set_trace; set_trace()
if not self.skip_clean:
test_utils.clean_test_files(skip_staticfiles=True)
......
"""
Helper functions for test tasks
"""
from paver.easy import sh, task, cmdopts
from paver.easy import sh, task, cmdopts, consume_args
from pavelib.utils.envs import Env
import os
import subprocess
......@@ -13,7 +13,8 @@ __test__ = False # do not collect
@task
def clean_test_files(skip_staticfiles=False):
@consume_args
def clean_test_files(skip_staticfiles=None):
"""
Clean fixture files used by tests and .pyc files
......@@ -21,9 +22,10 @@ def clean_test_files(skip_staticfiles=False):
cleaning the staticfiles directory, which is expensive to create
but not relevant for all test types.
"""
static_files_str = ""
static_files_str = "test_root/staticfiles"
if skip_staticfiles:
static_files_str = "test_root/staticfiles"
static_files_str = ""
from nose.tools import set_trace; set_trace()
sh("git clean -fqdx test_root/logs test_root/data {static_files_str} test_root/uploads".format(
static_files_str=static_files_str
))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment