Beispiel #1
0
import sys
import os
import atexit
import subprocess
import time


if 'nosetests' in sys.argv[0]:
    # Configure webpack before any tests are run
    import webpack.conf
    from .settings import WEBPACK
    webpack.conf.settings.configure(**WEBPACK)

from webpack.compiler import build_server

if build_server.is_running():
    raise Exception(
        'A build server is already running at {}, this will cause test failures. The server should be stopped'.format(
            build_server.url
        )
    )

process = subprocess.Popen(
    (
        os.path.join(os.getcwd(), 'node_modules', '.bin', 'webpack-build'),
        '-s'
    ),
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT
)
Beispiel #2
0
import sys
import os
import atexit
import subprocess

if 'nosetests' in sys.argv[0]:
    # Configure webpack before any tests are run
    import webpack.conf
    from .settings import WEBPACK
    webpack.conf.settings.configure(**WEBPACK)

from webpack.compiler import build_server

if build_server.is_running():
    raise Exception(
        'A build server is already running at {}, this will cause test failures. The server should be stopped'
        .format(build_server.url))

process = subprocess.Popen(
    (os.path.join(os.getcwd(), 'node_modules', '.bin', 'webpack-build'), ),
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT)

# Ensure the process is killed
atexit.register(lambda _process: _process.kill(), process)

output = process.stdout.readline().decode('utf-8')

if output.strip() == '':
    output += process.stdout.readline().decode('utf-8')
Beispiel #3
0
import sys
import os
import atexit
import subprocess
import time

if 'nosetests' in sys.argv[0]:
    # Configure webpack before any tests are run
    import webpack.conf
    from .settings import WEBPACK
    webpack.conf.settings.configure(**WEBPACK)

from webpack.compiler import build_server

if build_server.is_running():
    raise Exception(
        'A build server is already running at {}, this will cause test failures. The server should be stopped'
        .format(build_server.url))

process = subprocess.Popen(
    (os.path.join(os.getcwd(), 'node_modules', '.bin', 'webpack-build'), '-s'),
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT)

# Ensure the process is killed
atexit.register(lambda _process: _process.kill(), process)

output = process.stdout.readline().decode('utf-8')

if output.strip() == '':
    output += process.stdout.readline().decode('utf-8')
Beispiel #4
0
import sys
import os
import atexit
import subprocess


if 'nosetests' in sys.argv[0]:
    # Configure webpack before any tests are run
    import webpack.conf
    from .settings import WEBPACK
    webpack.conf.settings.configure(**WEBPACK)

from webpack.compiler import build_server

if build_server.is_running():
    raise Exception(
        'A build server is already running at {}, this will cause test failures. The server should be stopped'.format(
            build_server.url
        )
    )

process = subprocess.Popen(
    (os.path.join(os.getcwd(), 'node_modules', '.bin', 'webpack-build'),),
    stdout=subprocess.PIPE,
    stderr=subprocess.STDOUT
)

# Ensure the process is killed
atexit.register(lambda _process: _process.kill(), process)

output = process.stdout.readline().decode('utf-8')