~divmod-dev/divmod.org/dangling-1091

« back to all changes in this revision

Viewing changes to Axiom/axiom/test/test_inheritance.py

  • Committer: glyph
  • Date: 2005-07-28 22:09:16 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:2
move this repository to a more official-looking URL

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# This module is really a placeholder: inheritance between database classes is
 
3
# unsupported in XAtop right now.  We are just making sure that it is
 
4
# aggressively unsupported.
 
5
 
 
6
from twisted.trial import unittest
 
7
 
 
8
from axiom.item import Item, NoInheritance
 
9
from axiom.attributes import integer
 
10
 
 
11
class InheritanceUnsupported(unittest.TestCase):
 
12
 
 
13
    def testNoInheritance(self):
 
14
        class XA(Item):
 
15
            schemaVersion = 1
 
16
            typeName = 'inheritance_test_xa'
 
17
            a = integer()
 
18
 
 
19
        try:
 
20
            class XB(XA):
 
21
                schemaVersion = 1
 
22
                typeName = 'inheritance_test_xb'
 
23
                b = integer()
 
24
        except NoInheritance:
 
25
            pass
 
26
        else:
 
27
            self.fail("Expected RuntimeError but none occurred")
 
28