Skip to content

Commit

Permalink
An attempt to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Jan 19, 2017
1 parent a629b42 commit 53d098f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 13 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ install:
- Xvfb :1 &

script:
- cd dotplot
- DISPLAY=:1 python3 -m pytest -v
- DISPLAY=:1 python3 -m pytest -v --cov=.

Expand Down
7 changes: 6 additions & 1 deletion dotplot/matrices.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module works with similarity matrices of aminoacids"""
import os


available_matrices = {
Expand Down Expand Up @@ -73,7 +74,11 @@ def normalize(self, matrix):
@staticmethod
def read_raw_matrix(filename):
"""This function converts the matrix into a dictionary"""
with open(filename) as f:
path = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
filename
)
with open(path) as f:
lines = f.readlines()
matrix = {}
# read aminoacids' order from first line and make all the letters
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions dotplot/tests/gui/test_options.py → tests/gui/test_options.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from gui.options import OptionPanel
from gui.options import WindowSize
from gui.options import Stringency
from gui.options import ShowSequence
from gui.options import Matrix
from gui.helpers import Option
from dotplot.gui.options import OptionPanel
from dotplot.gui.options import WindowSize
from dotplot.gui.options import Stringency
from dotplot.gui.options import ShowSequence
from dotplot.gui.options import Matrix
from dotplot.gui.helpers import Option
from copy import copy


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import argparse
from argument_parser import positive_int
from dotplot.argument_parser import positive_int


def test_positive_int():
Expand Down
2 changes: 1 addition & 1 deletion dotplot/tests/test_dotplot.py → tests/test_dotplot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from main import main
from dotplot.main import main


def test_main():
Expand Down
2 changes: 1 addition & 1 deletion dotplot/tests/test_matrices.py → tests/test_matrices.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from matrices import SimilarityMatrix
from dotplot.matrices import SimilarityMatrix
from argparse import Namespace


Expand Down
4 changes: 2 additions & 2 deletions dotplot/tests/test_plotter.py → tests/test_plotter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from plotter import Plotter
from sequence import Sequence
from dotplot.plotter import Plotter
from dotplot.sequence import Sequence


class DummyNamespace:
Expand Down

0 comments on commit 53d098f

Please sign in to comment.