Skip to content

Commit

Permalink
Skip problematic tests in Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Feb 28, 2024
1 parent d6ce663 commit d6baa6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/spatiotemporal/test/test_make_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import IMP.spatiotemporal.graphNode as graphNode
import shutil
import os
import sys
import itertools
import numpy as np

Expand Down Expand Up @@ -88,6 +89,8 @@ def test_graph_scoring(self):
if trajectory[0][0].get_label() == '1' and trajectory[0][1].get_label() == '1' and trajectory[0][2].get_label() == '1':
self.assertAlmostEqual(trajectory[1], 2.0, delta=1e-4)

@unittest.skipIf(sys.version_info[0] < 3,
"Does not work with ancient numpy in Python 2")
def test_temporal_scoring(self):
"""
Tests spatiotemporal rule functionality. Found in draw_edge function of graphNode
Expand Down Expand Up @@ -123,6 +126,8 @@ def test_composition_scoring(self):
if trajectory[0][0].get_label() == '1' and trajectory[0][1].get_label() == '2' and trajectory[0][2].get_label() == '1':
self.assertAlmostEqual(trajectory[1], 6.701131199228036, delta=1e-4)

@unittest.skipIf(sys.version_info[0] < 3,
"Does not work with ancient numpy in Python 2")
def test_writing_output(self):
"""
Tests writing text output. From write_output.py
Expand Down

0 comments on commit d6baa6b

Please sign in to comment.