Commit 79e4b423 authored by Joseph Weston's avatar Joseph Weston
Browse files

Merge branch 'stable_py2' into stable

parents 242df6b3 a82d9e88
Pipeline #473 passed with stage
......@@ -134,7 +134,7 @@ class SiteFamily(metaclass=abc.ABCMeta):
try:
return self.canonical_repr != other.canonical_repr
except AttributeError:
return False
return True
@abc.abstractmethod
def normalize_tag(self, tag):
......
......@@ -8,7 +8,7 @@
import warnings
from random import Random
from nose.tools import assert_raises
from nose.tools import assert_raises, assert_not_equal
from numpy.testing import assert_equal, assert_almost_equal
import tinyarray as ta
import kwant
......@@ -102,6 +102,12 @@ def test_site_families():
assert_equal(sys[ofam(1)], 123)
assert_raises(KeyError, sys.__getitem__, yafam(1))
# test site families compare equal/not-equal
assert_equal(fam, ofam)
assert_not_equal(fam, yafam)
assert_not_equal(fam, None)
assert_not_equal(fam, 'a')
class VerySimpleSymmetry(builder.Symmetry):
def __init__(self, period):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment