Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6d176c

Browse files
committed
Standardize Python.Test fixture location
Ensures that Python.Test is output to same location on both Linux and Windowsas part of build..gitkeep to be ensure folder is part of version control.Can be removed if any file is added to it.
1 parent3212cfe commitf6d176c

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

‎.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,13 @@ addons:
3030
-ca-certificates-mono
3131

3232
before_install:
33-
# Set-up location where `Python.Test.dll` will be output
34-
-export PYTHONPATH=`pwd`:$PYTHONPATH
35-
3633
# Set-up dll path for embedded tests
3734
-PY_LIBDIR=$(python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')
3835
-export LD_LIBRARY_PATH=$PY_LIBDIR:$LD_LIBRARY_PATH
3936

4037
install:
4138
-pip install --upgrade -r requirements.txt
42-
# `setup.py install` works too, but need to deal with `Python.Test` PATH
43-
-coverage run setup.py build_ext --inplace
39+
-coverage run setup.py install
4440

4541
script:
4642
-python -m pytest

‎appveyor.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ environment:
1919
-PYTHON_VERSION:3.6
2020

2121
init:
22-
# Prepare Environment
23-
-mkdir C:\testdir
24-
2522
# Update Environment Variables based on matrix/platform
2623
-set PY_VER=%PYTHON_VERSION:.=%
2724
-set PYTHON=C:\PYTHON%PY_VER%
@@ -44,8 +41,6 @@ build_script:
4441

4542
test_script:
4643
-pip install --no-index --find-links=.\dist\ pythonnet
47-
-ps:Copy-Item .\src\testing\bin\Python.Test.dll C:\testdir\
48-
4944
-ps:.\ci\appveyor_run_tests.ps1
5045
-ps:.\ci\appveyor_build_recipe.ps1
5146

‎src/testing/Python.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
<TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb>
104104
</PropertyGroup>
105105
<TargetName="AfterBuild">
106-
<CopySourceFiles="$(TargetAssembly)"DestinationFolder="$(PythonBuildDir)" />
106+
<CopySourceFiles="$(TargetAssembly)"DestinationFolder="$(SolutionDir)\src\tests\fixtures" />
107107
<CopySourceFiles="$(TargetAssemblyPdb)"Condition="Exists('$(TargetAssemblyPdb)')"DestinationFolder="$(PythonBuildDir)" />
108108
</Target>
109109
</Project>

‎src/tests/conftest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
"""Helpers for testing."""
66

77
importctypes
8+
importos
89
importsys
910
importsysconfig
1011

1112
importclr
1213

13-
# Add path for Python.Test & Add References
14-
sys.path.append('C:/testdir/')
14+
# Add path for `Python.Test`
15+
cwd=os.path.dirname(__file__)
16+
fixtures=os.path.join(cwd,'fixtures')
17+
sys.path.append(fixtures)
18+
19+
# Add References for tests
1520
clr.AddReference("Python.Test")
1621
clr.AddReference("System.Collections")
1722
clr.AddReference("System.Data")

‎src/tests/fixtures/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp