diff --git a/lib/pymoc/moc.py b/lib/pymoc/moc.py
index <HASH>..<HASH> 100644
--- a/lib/pymoc/moc.py
+++ b/lib/pymoc/moc.py
@@ -166,6 +166,14 @@ class MOC(object):
 
         return True
 
+    def __ne__(self, other):
+        """Inequality test operator.
+
+        Implemented via __eq__.
+        """
+
+        return not self.__eq__(other)
+
     def __iadd__(self, other):
         """In-place addition operator.
Implement __ne__ method of MOC class

This just calls self.__eq__ and applies the not operator.

Not defining __ne__ was causing the doctests to fail when run with
Sphinx running on Python 2.  They passed with Sphinx on Python 3,
even though the Python 3 documentation also mysteriously says that
__ne__ should be defined whenever __eq__ is.