~canonical-livepatch-dependencies/canonical-livepatch-service-dependencies/twisted

« back to all changes in this revision

Viewing changes to twisted/python/test/test_textattributes.py

  • Committer: Free Ekanayaka
  • Date: 2016-07-01 12:22:33 UTC
  • Revision ID: free.ekanayaka@canonical.com-20160701122233-nh55w514zwzoz1ip
Tags: upstream-16.2.0
ImportĀ upstreamĀ versionĀ 16.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) Twisted Matrix Laboratories.
 
2
# See LICENSE for details.
 
3
 
 
4
"""
 
5
Tests for L{twisted.python.textattributes}.
 
6
"""
 
7
 
 
8
from twisted.trial import unittest
 
9
from twisted.python._textattributes import DefaultFormattingState
 
10
 
 
11
 
 
12
 
 
13
class DefaultFormattingStateTests(unittest.TestCase):
 
14
    """
 
15
    Tests for L{twisted.python._textattributes.DefaultFormattingState}.
 
16
    """
 
17
    def test_equality(self):
 
18
        """
 
19
        L{DefaultFormattingState}s are always equal to other
 
20
        L{DefaultFormattingState}s.
 
21
        """
 
22
        self.assertEqual(
 
23
            DefaultFormattingState(),
 
24
            DefaultFormattingState())
 
25
        self.assertNotEqual(
 
26
            DefaultFormattingState(),
 
27
            'hello')