Skip to content

travis #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
travis
  • Loading branch information
aladdinpersson committed Mar 7, 2019
commit f75d140cb51937af2cd79855f2ca2cbe89b91eae
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ before_script:

script:
- awesome_bot README.md --allow-dupe --allow-redirect
Algorithm_tests\graphtheory_tests
- python Algorithm_tests/sorting_tests/test_sorting.py
- python Algorithm_tests/Algorithm_tests/graphtheory_tests/bellman_ford_test.py
Empty file.
8 changes: 6 additions & 2 deletions Algorithm_tests/graphtheory_tests/bellman_ford_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
import unittest

# For importing from different folders
sys.path.append('../../Algorithms/graphtheory/bellman-ford')
# OBS: This is supposed to be done with automated testing, hence relative to folder we want to import from
sys.path.append('Algorithms/graphtheory/bellman-ford')

# If run from local:
#sys.path.append('../../Algorithms/graphtheory/bellman-ford')

from bellman_ford import bellman_ford, make_graph

class test_sorting(unittest.TestCase):

def test_loadgraph(self):
correct_graph = {1: {2: 5, 3: 10}, 2: {4: -5}, 3: {4: 15}}
graph = make_graph('test_graph.txt')
graph = make_graph('Algorithm_tests/graphtheory_tests/test_graph.txt')

self.assertEqual(graph, correct_graph)

Expand Down
5 changes: 3 additions & 2 deletions Algorithm_tests/sorting_tests/test_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

# For importing from different folders
# OBS: This is supposed to be done with automated testing, hence relative to folder we want to import from
sys.path.append('Algorithms/sorting')
# sys.path.append('Algorithms/sorting')

# If run from local:
#sys.path.append('../../Algorithms/sorting')
sys.path.append('../../Algorithms/sorting')

from bubblesort import bubblesort
from insertionsort import insertionsort
Expand All @@ -31,6 +31,7 @@
L5 = []
L5_sorted = []


class test_sorting(unittest.TestCase):

def test_bubblesort(self):
Expand Down
Binary file not shown.