File: test_symbol.py

package info (click to toggle)
python3-openid 3.0.2%2Bgit20140828-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,672 kB
  • ctags: 2,679
  • sloc: python: 17,137; xml: 234; sh: 15; makefile: 4
file content (35 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import unittest

from openid import oidutil

class SymbolTest(unittest.TestCase):
    def test_selfEquality(self):
        s = oidutil.Symbol('xxx')
        self.assertEqual(s, s)

    def test_otherEquality(self):
        x = oidutil.Symbol('xxx')
        y = oidutil.Symbol('xxx')
        self.assertEqual(x, y)

    def test_inequality(self):
        x = oidutil.Symbol('xxx')
        y = oidutil.Symbol('yyy')
        self.assertNotEqual(x, y)

    def test_selfInequality(self):
        x = oidutil.Symbol('xxx')
        self.assertFalse(x != x)

    def test_otherInequality(self):
        x = oidutil.Symbol('xxx')
        y = oidutil.Symbol('xxx')
        self.assertFalse(x != y)

    def test_ne_inequality(self):
        x = oidutil.Symbol('xxx')
        y = oidutil.Symbol('yyy')
        self.assertTrue(x != y)

if __name__ == '__main__':
    unittest.main()