Skip to content

Commit e112c12

Browse files
committed
update odm_1_1 tests to be skipped (compile w/o error)
rename so they show up as _1_1 tests in pycharm
1 parent 0e64624 commit e112c12

File tree

10 files changed

+31
-25
lines changed

10 files changed

+31
-25
lines changed

tests/test_odm1/test_odmdata/test_FreeTDS.py renamed to tests/test_odm1/test_odmdata/test_FreeTDS_1_1.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# -*- coding: utf-8 -*-
2-
from odmtools.odmdata import SessionFactory, variable, series
3-
from odmtools.odmservices import SeriesService
4-
from tests import test_util
5-
import wx
6-
from tests.test_util import build_db
2+
from odm2api.ODM1_1_1.models import Variable, Series
3+
from odm2api.ODM1_1_1.services import SeriesService
4+
from odm2api.ODMconnection import SessionFactory
5+
from tests import test_util1_1_1 as test_util
6+
7+
#import wx
8+
from tests.test_util1_1_1 import build_db
79
import urllib
810
import sqlalchemy
911
from sqlalchemy.orm import sessionmaker
1012
import pytest
1113

12-
@pytest.mark.skip(
14+
@pytest.mark.skipif(True,
1315
reason="ODM1.1 shim is out of date")
14-
class TestFreeTDS:
16+
class TestFreeTDS_1_1:
1517
def setup(self):
1618
# connection string
1719

@@ -27,12 +29,12 @@ def setup(self):
2729
assert Session
2830
session = Session()
2931
assert session
30-
q= session.query(variable.Variable).all()
32+
q= session.query(Variable.Variable).all()
3133
print "q:", type(q), dir(q)
3234
for i in q:
3335
print i
3436
#conn.close()
35-
q= session.query(series.Series).all()
37+
q= session.query(Series.Series).all()
3638
for i in q[:10]:
3739
print i
3840
assert q

tests/test_odm1/test_odmdata/test_data_value.py renamed to tests/test_odm1/test_odmdata/test_data_value_1_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@pytest.mark.skipif(True,
1010
reason="ODM1.1 shim is out of date")
11-
class TestDataValue:
11+
class TestDataValue_1_1:
1212
def setup(self):
1313
self.connection_string = "sqlite:///:memory:"
1414
session_factory = SessionFactory(self.connection_string, echo=False)

tests/test_odm1/test_odmdata/test_memory_db.py renamed to tests/test_odm1/test_odmdata/test_memory_db_1_1.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import pytest
22

3-
from odmtools.odmdata import MemoryDatabase
4-
from odmtools.odmservices import SeriesService
5-
from tests import test_util
3+
from odm2api.ODM1_1_1 import memory_database as MemoryDatabase
4+
from odm2api.ODM1_1_1.services import SeriesService
5+
from tests import test_util1_1_1 as test_util
6+
67
import datetime
78

89
import pytest
910

10-
@pytest.mark.skip(
11+
@pytest.mark.skipif(True,
1112
reason="ODM1.1 shim is out of date")
12-
class TestMemoryDB:
13+
class TestMemoryDB_1_1:
1314
def setup(self):
1415
self.connection_string = "sqlite:///:memory:"
1516
self.series_service = SeriesService(connection_string=self.connection_string, debug=False)

tests/test_odm1/test_odmdata/test_pandas_memory_db.py renamed to tests/test_odm1/test_odmdata/test_pandas_memory_db_1_1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from odmtools.odmdata import SessionFactory
1+
from odm2api.ODMconnection import SessionFactory
22

33
from odm2api.ODM1_1_1.models import Series
44
from odm2api.ODM1_1_1.services import SeriesService
@@ -12,9 +12,9 @@
1212
"""
1313
import pytest
1414

15-
@pytest.mark.skip(
15+
@pytest.mark.skipif(True,
1616
reason="ODM1.1 shim is out of date")
17-
class TestPandasMemoryDB:
17+
class TestPandasMemoryDB_1_1:
1818
"""
1919
Test to Load up a series from a dataframe and load it into an in memory database
2020
"""

tests/test_odm1/test_odmdata/test_series.py renamed to tests/test_odm1/test_odmdata/test_series_1_1.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from odm2api.ODM1_1_1.models import *
2-
from odmtools.odmdata import copy_series
2+
#from odm2api.ODM1_1_1.odmdata import copy_series
3+
from odm2api.ODMconnection import SessionFactory
34

45
from tests import test_util1_1_1 as test_util
56

67
import pytest
78

8-
@pytest.mark.skip(
9+
@pytest.mark.skipif(True,
910
reason="ODM1.1 shim is out of date")
10-
class TestSeries:
11+
class TestSeries_1_1:
1112
def setup(self):
1213
self.connection_string = "sqlite:///:memory:"
1314
session_factory = SessionFactory(self.connection_string, echo=False)

tests/test_odm1/test_odmdata/test_session_factory.py renamed to tests/test_odm1/test_odmdata/test_session_factory_1_1.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from odmtools.odmdata import SessionFactory
1+
from odm2api.ODMconnection import SessionFactory
22

33
import pytest
44

5-
@pytest.mark.skip(
5+
@pytest.mark.skipif(True,
66
reason="ODM1.1 shim is out of date")
7-
class TestSessionFactory:
7+
class TestSessionFactory_1_1:
88
def setup(self):
99
self.connection_string = "sqlite:///:memory:"
1010
self.session_factory = SessionFactory(self.connection_string, echo=True)

tests/test_odm1/test_odmservices/test_cv_service.py renamed to tests/test_odm1/test_odmservices/test_cv_service_1_1.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import pytest
22
import sqlalchemy.orm.exc
33
from odm2api.ODM1_1_1.models import Qualifier
4-
from odm2api.ODM1_1_1.services import CVService
4+
#from odm2api.ODM1_1_1.services import CVService
55

66
from tests import test_util1_1_1 as test_util
77

88

99
session = None
1010

1111

12+
@pytest.mark.skipif(True,
13+
reason="ODM1.1 shim is out of date")
1214
class TestCVService_1_1:
1315
def setup(self):
1416
self.connection_string = "sqlite:///:memory:"

tests/test_odm1/test_odmservices/test_edit_service.py renamed to tests/test_odm1/test_odmservices/test_edit_service._1_1py

File renamed without changes.

tests/test_odm1/test_odmservices/test_export_service.py renamed to tests/test_odm1/test_odmservices/test_export_service_1_1.py

File renamed without changes.

tests/test_odm1/test_odmservices/test_series_service.py renamed to tests/test_odm1/test_odmservices/test_series_service_1_1.py

File renamed without changes.

0 commit comments

Comments
 (0)