WebStatus: yes create public_html/ at startup, otherwise we get internal server error...
[buildbot.git] / buildbot / test / test_util.py
blobb375390a7c35c02e171a54d64939aeb4742853c1
1 # -*- test-case-name: buildbot.test.test_util -*-
3 from twisted.trial import unittest
5 from buildbot import util
8 class Foo(util.ComparableMixin):
9 compare_attrs = ["a", "b"]
11 def __init__(self, a, b, c):
12 self.a, self.b, self.c = a,b,c
15 class Bar(Foo, util.ComparableMixin):
16 compare_attrs = ["b", "c"]
18 class Compare(unittest.TestCase):
19 def testCompare(self):
20 f1 = Foo(1, 2, 3)
21 f2 = Foo(1, 2, 4)
22 f3 = Foo(1, 3, 4)
23 b1 = Bar(1, 2, 3)
24 self.failUnless(f1 == f2)
25 self.failIf(f1 == f3)
26 self.failIf(f1 == b1)