Exemplo n.º 1
0
    def test_reset(self):
        """
        Tests: sadface.reset()

        A sadface document is created and manipulated then reset is used
        to return the document to it's initial state
        """

        # Iniitialise a SADFace document
        sf.initialise()
        expected = None
        out = sf.get_title()
        self.assertEqual(out, expected)

        # Explicitly alter it
        expected = "DAKA DAKA"
        sf.set_title(expected)
        out = sf.get_title()
        self.assertEqual(out, expected)

        # Reset the document - this should now be in the pre-init, empty-dict state
        sf.reset()
        expected = {}
        out = sf.sd
        self.assertEqual(out, expected)
Exemplo n.º 2
0
 def tearDown(self):
     sf.reset()
Exemplo n.º 3
0
 def setUp(self):
     sf.reset()
Exemplo n.º 4
0
 def setUp(self):
     sf.reset()
     sf.config.set_location("etc/defaults.cfg")