From bfd0e586310099a82eca3cce0125c5b380ec0c76 Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Tue, 28 Aug 2018 16:17:38 +0300 Subject: [PATCH] Address review comments --- Makefile | 8 +++++++- test/conftest.py | 13 ++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 1181d69dd..933926763 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,9 @@ all: build/pyodide.asm.js \ build/matplotlib-sideload.html \ build/renderedhtml.css \ 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 \ @@ -105,6 +107,10 @@ test: all pytest test/ -v +build/test_data.txt: test/data.txt + cp test/data.txt build/test_data.txt + + lint: flake8 src flake8 test diff --git a/test/conftest.py b/test/conftest.py index 4cbc1d9ee..a0e6e13ac 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -7,7 +7,6 @@ import multiprocessing import os import pathlib import queue -import shutil import sys try: @@ -114,16 +113,8 @@ class ChromeWrapper(SeleniumWrapper): 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']) - def selenium_standalone(request, setup_resources): + def selenium_standalone(request): if request.param == 'firefox': cls = FirefoxWrapper elif request.param == 'chrome': @@ -136,7 +127,7 @@ if pytest is not None: selenium.driver.quit() @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 # selenium_standalone to avoid fixture scope issues if request.param == 'firefox':