Beispiel #1
0
 def test_equality_based_on_stream(self):
     output1 = StringIO()
     output2 = StringIO()
     stream1 = Stream(output1)
     stream2 = Stream(output2)
     self.assertNotEqual(stream1, stream2)
     stream2.stream = output1
     self.assertEqual(stream1, stream2)
 def test_equality_based_on_stream(self):
     output1 = StringIO()
     output2 = StringIO()
     stream1 = Stream(output1)
     stream2 = Stream(output2)
     self.assertNotEqual(stream1, stream2)
     stream2.stream = output1
     self.assertEqual(stream1, stream2)
Beispiel #3
0
    def test_stream_property(self):
        output = StringIO()
        dest = Stream(output)
        self.assertEqual(dest.stream, output)

        another_dest = Stream(StringIO())
        self.assertNotEqual(another_dest.stream, output)
        another_dest.stream = output
        self.assertEqual(another_dest.stream, output)
    def test_stream_property(self):
        output = StringIO()
        dest = Stream(output)
        self.assertEqual(dest.stream, output)

        another_dest = Stream(StringIO())
        self.assertNotEqual(another_dest.stream, output)
        another_dest.stream = output
        self.assertEqual(another_dest.stream, output)