Rename main_util_fixtures.py to conftest.py to allow fixture auto discovery

Also fix new PEP-008 issues.
This commit is contained in:
Nicola Soranzo
2020-02-14 15:50:06 +00:00
parent c15d656726
commit c738481e82
8 changed files with 36 additions and 30 deletions
+8 -9
View File
@@ -1,13 +1,12 @@
import os
import sys
import pytest
import utils
project_dir = os.path.dirname(__file__)
def test_cpp11(tmp_path):
# This test checks that the C++11 standard is supported
@@ -18,8 +17,8 @@ def test_cpp11(tmp_path):
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [x for x in utils.expected_wheels(
'spam', '0.1.0', macosx_deployment_target='10.9')
if 'cp27-cp27m-win' not in x]
'spam', '0.1.0', macosx_deployment_target='10.9')
if 'cp27-cp27m-win' not in x]
assert set(actual_wheels) == set(expected_wheels)
@@ -35,15 +34,15 @@ def test_cpp14():
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [x for x in utils.expected_wheels(
'spam', '0.1.0', macosx_deployment_target='10.9')
if 'cp27-cp27m-win' not in x and 'cp35-cp35m-win' not in x]
'spam', '0.1.0', macosx_deployment_target='10.9')
if 'cp27-cp27m-win' not in x and 'cp35-cp35m-win' not in x]
assert set(actual_wheels) == set(expected_wheels)
def test_cpp17():
# This test checks that the C++17 standard is supported
# Python 2.7 uses the `register` keyword which is forbidden in the C++17 standard
# Python 2.7 uses the `register` keyword which is forbidden in the C++17 standard
# The manylinux1 docker image does not have a compiler which supports C++11
# Python 3.4 and 3.5 are compiled with MSVC 10, which does not support C++17
if os.environ.get('APPVEYOR_BUILD_WORKER_IMAGE', '') == 'Visual Studio 2015':
@@ -55,6 +54,6 @@ def test_cpp17():
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [x for x in utils.expected_wheels(
'spam', '0.1.0', macosx_deployment_target='10.13')
if 'cp27-cp27m-win' not in x and 'cp35-cp35m-win' not in x]
'spam', '0.1.0', macosx_deployment_target='10.13')
if 'cp27-cp27m-win' not in x and 'cp35-cp35m-win' not in x]
assert set(actual_wheels) == set(expected_wheels)
+6 -2
View File
@@ -1,7 +1,11 @@
import os, sys
from setuptools import setup, Extension
import os
import platform
from setuptools import (
Extension,
setup,
)
standard = os.environ["STANDARD"]
language_standard = "/std:c++" + standard if platform.system() == "Windows" else "-std=c++" + standard