| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3212cfe commit f6d176c
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,17 +30,13 @@ addons: | |||
| 30 | 30 | - ca-certificates-mono | |
| 31 | 31 | ||
| 32 | 32 | before_install: | |
| 33 | - # Set-up location where `Python.Test.dll` will be output | ||
| 34 | - - export PYTHONPATH=`pwd`:$PYTHONPATH | ||
| 35 | - | ||
| 36 | 33 | # Set-up dll path for embedded tests | |
| 37 | 34 | - PY_LIBDIR=$(python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))') | |
| 38 | 35 | - export LD_LIBRARY_PATH=$PY_LIBDIR:$LD_LIBRARY_PATH | |
| 39 | 36 | ||
| 40 | 37 | install: | |
| 41 | 38 | - 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 | ||
| 44 | 40 | ||
| 45 | 41 | script: | |
| 46 | 42 | - python -m pytest | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,9 +19,6 @@ environment: | |||
| 19 | 19 | - PYTHON_VERSION: 3.6 | |
| 20 | 20 | ||
| 21 | 21 | init: | |
| 22 | - # Prepare Environment | ||
| 23 | - - mkdir C:\testdir | ||
| 24 | - | ||
| 25 | 22 | # Update Environment Variables based on matrix/platform | |
| 26 | 23 | - set PY_VER=%PYTHON_VERSION:.=% | |
| 27 | 24 | - set PYTHON=C:\PYTHON%PY_VER% | |
@@ -44,8 +41,6 @@ build_script: | |||
| 44 | 41 | ||
| 45 | 42 | test_script: | |
| 46 | 43 | - pip install --no-index --find-links=.\dist\ pythonnet | |
| 47 | - - ps: Copy-Item .\src\testing\bin\Python.Test.dll C:\testdir\ | ||
| 48 | - | ||
| 49 | 44 | - ps: .\ci\appveyor_run_tests.ps1 | |
| 50 | 45 | - ps: .\ci\appveyor_build_recipe.ps1 | |
| 51 | 46 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,7 +103,7 @@ | |||
| 103 | 103 | <TargetAssemblyPdb>$(TargetDir)$(TargetName).pdb</TargetAssemblyPdb> | |
| 104 | 104 | </PropertyGroup> | |
| 105 | 105 | <Target Name="AfterBuild"> | |
| 106 | - <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> | ||
| 106 | + <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(SolutionDir)\src\tests\fixtures" /> | ||
| 107 | 107 | <Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /> | |
| 108 | 108 | </Target> | |
| 109 | 109 | </Project> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,13 +5,18 @@ | |||
| 5 | 5 | """Helpers for testing.""" | |
| 6 | 6 | ||
| 7 | 7 | import ctypes | |
| 8 | + import os | ||
| 8 | 9 | import sys | |
| 9 | 10 | import sysconfig | |
| 10 | 11 | ||
| 11 | 12 | import clr | |
| 12 | 13 | ||
| 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 | ||
| 15 | 20 | clr.AddReference("Python.Test") | |
| 16 | 21 | clr.AddReference("System.Collections") | |
| 17 | 22 | clr.AddReference("System.Data") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments