Commit bf1d3177 authored by Joseph Weston's avatar Joseph Weston
Browse files

Merge branch 'stable'

parents 9692496f 79e4b423
......@@ -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, assert_true
from nose.tools import assert_raises, assert_true, 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(syst[ofam(1)], 123)
assert_raises(KeyError, syst.__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