Skip to content

Commit c2dcfc8

Browse files
tqa236cmccandless
authored andcommitted
Add Python 3.8 to Travis CI config (#2142)
* Add Python 3.8 to Travis CI * Change assert statement to fix a deprecation warning
1 parent 3091e17 commit c2dcfc8

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
language: python
22
dist: xenial
3-
3+
44
python:
55
- 3.5
66
- 3.6
77
- 3.7
8+
- 3.8
89
- nightly
910

1011
matrix:
@@ -42,6 +43,6 @@ matrix:
4243

4344
before_script:
4445
- flake8
45-
46-
script:
46+
47+
script:
4748
- ./test/check-exercises.py

exercises/pov/.meta/template.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{%- macro test_path_to(case) -%}
2424
{% if case["expected"] -%}
2525
expected = {{ case["expected"] }}
26-
self.assertEquals(tree.{{ case["property"] | to_snake }}("{{ case["input"]["from"] }}", "{{ case["input"]["to"]}}"), expected)
26+
self.assertEqual(tree.{{ case["property"] | to_snake }}("{{ case["input"]["from"] }}", "{{ case["input"]["to"]}}"), expected)
2727
{% else -%}
2828
with self.assertRaisesWithMessage(ValueError):
2929
tree.{{ case["property"] | to_snake }}("{{ case["input"]["from"] }}", "{{ case["input"]["to"]}}")

exercises/pov/pov_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def test_errors_if_target_does_not_exist_in_a_large_tree(self):
9292
def test_can_find_path_to_parent(self):
9393
tree = Tree("parent", [Tree("x"), Tree("sibling")])
9494
expected = ["x", "parent"]
95-
self.assertEquals(tree.path_to("x", "parent"), expected)
95+
self.assertEqual(tree.path_to("x", "parent"), expected)
9696

9797
def test_can_find_path_to_sibling(self):
9898
tree = Tree("parent", [Tree("a"), Tree("x"), Tree("b"), Tree("c")])
9999
expected = ["x", "parent", "b"]
100-
self.assertEquals(tree.path_to("x", "b"), expected)
100+
self.assertEqual(tree.path_to("x", "b"), expected)
101101

102102
def test_can_find_path_to_cousin(self):
103103
tree = Tree(
@@ -115,20 +115,20 @@ def test_can_find_path_to_cousin(self):
115115
],
116116
)
117117
expected = ["x", "parent", "grandparent", "uncle", "cousin-1"]
118-
self.assertEquals(tree.path_to("x", "cousin-1"), expected)
118+
self.assertEqual(tree.path_to("x", "cousin-1"), expected)
119119

120120
def test_can_find_path_not_involving_root(self):
121121
tree = Tree(
122122
"grandparent",
123123
[Tree("parent", [Tree("x"), Tree("sibling-0"), Tree("sibling-1")])],
124124
)
125125
expected = ["x", "parent", "sibling-1"]
126-
self.assertEquals(tree.path_to("x", "sibling-1"), expected)
126+
self.assertEqual(tree.path_to("x", "sibling-1"), expected)
127127

128128
def test_can_find_path_from_nodes_other_than_x(self):
129129
tree = Tree("parent", [Tree("a"), Tree("x"), Tree("b"), Tree("c")])
130130
expected = ["a", "parent", "c"]
131-
self.assertEquals(tree.path_to("a", "c"), expected)
131+
self.assertEqual(tree.path_to("a", "c"), expected)
132132

133133
def test_errors_if_destination_does_not_exist(self):
134134
tree = Tree(

0 commit comments

Comments
 (0)