Commit bfd0e586 authored by Roman Yurchak's avatar Roman Yurchak

Address review comments

parent 46c2aa9b
...@@ -49,7 +49,9 @@ all: build/pyodide.asm.js \ ...@@ -49,7 +49,9 @@ all: build/pyodide.asm.js \
build/matplotlib-sideload.html \ build/matplotlib-sideload.html \
build/renderedhtml.css \ build/renderedhtml.css \
build/test.data \ build/test.data \
build/packages.json build/packages.json \
build/test_data.txt \
build/test.html
build/pyodide.asm.js: src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.bc \ build/pyodide.asm.js: src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.bc \
...@@ -105,6 +107,10 @@ test: all ...@@ -105,6 +107,10 @@ test: all
pytest test/ -v pytest test/ -v
build/test_data.txt: test/data.txt
cp test/data.txt build/test_data.txt
lint: lint:
flake8 src flake8 src
flake8 test flake8 test
......
...@@ -7,7 +7,6 @@ import multiprocessing ...@@ -7,7 +7,6 @@ import multiprocessing
import os import os
import pathlib import pathlib
import queue import queue
import shutil
import sys import sys
try: try:
...@@ -114,16 +113,8 @@ class ChromeWrapper(SeleniumWrapper): ...@@ -114,16 +113,8 @@ class ChromeWrapper(SeleniumWrapper):
if pytest is not None: if pytest is not None:
@pytest.fixture(scope='session')
def setup_resources():
shutil.copyfile(TEST_PATH / 'data.txt',
BUILD_PATH / 'test_data.txt')
shutil.copyfile(TEST_PATH.parent / 'src' / 'test.html',
BUILD_PATH / 'test.html')
@pytest.fixture(params=['firefox', 'chrome']) @pytest.fixture(params=['firefox', 'chrome'])
def selenium_standalone(request, setup_resources): def selenium_standalone(request):
if request.param == 'firefox': if request.param == 'firefox':
cls = FirefoxWrapper cls = FirefoxWrapper
elif request.param == 'chrome': elif request.param == 'chrome':
...@@ -136,7 +127,7 @@ if pytest is not None: ...@@ -136,7 +127,7 @@ if pytest is not None:
selenium.driver.quit() selenium.driver.quit()
@pytest.fixture(params=['firefox', 'chrome'], scope='module') @pytest.fixture(params=['firefox', 'chrome'], scope='module')
def _selenium_cached(request, setup_resources): def _selenium_cached(request):
# Cached selenium instance. This is a copy-paste of # Cached selenium instance. This is a copy-paste of
# selenium_standalone to avoid fixture scope issues # selenium_standalone to avoid fixture scope issues
if request.param == 'firefox': if request.param == 'firefox':
......
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