Skip to content

Commit 0223157

Browse files
author
fdieulle
committed
Try to fix travis issue for unit tests
1 parent fe48053 commit 0223157

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

tests/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import os
2+
import clr
3+
import sys
4+
5+
lib_folder = os.path.join(os.path.dirname(__file__), 'libs')
6+
if lib_folder not in sys.path:
7+
sys.path.append(lib_folder)
8+
9+
clr.AddReference('LibForTests')

tests/test_numpy_codecs.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
import pandasnet
2-
import os
32
import numpy as np
43
import pytest
5-
import clr
64

7-
8-
lib_file = os.path.join(os.path.dirname(__file__), 'libs', 'LibForTests.dll')
9-
if os.path.exists(lib_file):
10-
clr.AddReference(lib_file)
11-
12-
from LibForTests import NumpyNet as npnet
5+
from LibForTests import NumpyNet as npnet
136

147

158
@pytest.mark.skip(reason="pythonnet do not allow override")

tests/test_pandas_codecs.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
import pandasnet
2-
import os
32
import pandas as pd
43
import numpy as np
54
from datetime import datetime
6-
import clr
75
import pytest
86

9-
lib_file = os.path.join(os.path.dirname(__file__), 'libs', 'LibForTests.dll')
10-
if os.path.exists(lib_file):
11-
clr.AddReference(lib_file)
7+
from LibForTests import PandasNet as pdnet
128

13-
from LibForTests import NumpyNet as npnet
149

15-
@pytest.mark.skip(reason="travis issue")
1610
def test_basic_dataframe():
1711
x = pd.DataFrame({
1812
'A': [1, 2, 3],
@@ -25,7 +19,7 @@ def test_basic_dataframe():
2519

2620
__check(x, y)
2721

28-
@pytest.mark.skip(reason="travis issue")
22+
2923
def test_datetime64_into_dataframe():
3024
x = pd.DataFrame({
3125
'Utc': [

0 commit comments

Comments
 (0)