File: test_utility.py

package info (click to toggle)
gmplot 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,732 kB
  • sloc: python: 2,023; makefile: 11
file content (10 lines) | stat: -rw-r--r-- 274 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import unittest
from gmplot.utility import StringIO

class StringIOTest(unittest.TestCase):
    def test_enter_exit(self):
        with StringIO() as f:
            f.write('Content')
            self.assertEqual(f.getvalue(), 'Content')

        self.assertTrue(f.closed)