2017-10-22 02:14:44 +00:00
|
|
|
var gulp = require('gulp');
|
|
|
|
|
|
|
|
var spawn = require('child_process').spawn;
|
|
|
|
|
|
|
|
|
|
|
|
gulp.task('test', function(cb) {
|
2017-11-09 12:14:06 +00:00
|
|
|
var command = ['run', 'python', 'manage.py', 'test'];
|
|
|
|
command = command.concat(process.argv.splice(3));
|
|
|
|
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb);
|
2017-10-22 02:14:44 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('coverage', function(cb) {
|
|
|
|
spawn(
|
|
|
|
'pipenv',
|
|
|
|
[
|
|
|
|
'run',
|
|
|
|
'coverage',
|
|
|
|
'run',
|
|
|
|
'manage.py',
|
|
|
|
'test'
|
|
|
|
],
|
|
|
|
{
|
|
|
|
stdio: 'inherit'
|
|
|
|
}
|
|
|
|
).on('exit', cb);
|
|
|
|
});
|