Skip to content

Commit

Permalink
tox: fix the coverage
Browse files Browse the repository at this point in the history
- Pin some packages in test-requirements has requested by hacking 0.10.1.
- Ignore H104: Empty file, like for example __init__.py files
- Fix the import orders

Change-Id: I7095bc50c2197cae76c83b3fcd539879eca2cf8f
  • Loading branch information
Gonéri Le Bouder authored and goneri committed Apr 7, 2015
1 parent 5a50cfa commit 53ec602
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
3 changes: 2 additions & 1 deletion init_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
# License for the specific language governing permissions and limitations
# under the License.

import server.db.api as api
from server.db.models import Environment
from server.db.models import File
from server.db.models import Job
from server.db.models import Platform
from server.db.models import Scenario
from server.db.models import session
import server.db.api as api


session.query(Job).delete()
session.query(File).delete()
Expand Down
3 changes: 0 additions & 3 deletions server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-


1 change: 0 additions & 1 deletion server/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

2 changes: 1 addition & 1 deletion server/db/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from server.db.models import Environment
from server.db.models import File
from server.db.models import Job
from server.db.models import Jobstate
from server.db.models import Platform
from server.db.models import Scenario
from server.db.models import Jobstate
from server.db.models import session


Expand Down
4 changes: 2 additions & 2 deletions server/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.

from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine
from sqlalchemy.ext.automap import automap_base
from sqlalchemy import MetaData
from sqlalchemy.orm import Session

engine = create_engine("postgresql://boa:boa@localhost:5432/dci_control_server")

Expand Down
4 changes: 3 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
flake8>=2.1.0
flake8==2.2.4
pep8==1.5.7
mccabe==0.2.1
hacking>=0.10.1
mock>=1.0.1
pytest>=2.6.2
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ commands =
py.test --cov-report html --cov server

[flake8]
ignore = H405,H304
ignore = H405,H304,H104
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc
show-source = True

0 comments on commit 53ec602

Please sign in to comment.