Exemplo n.º 1
0
    def test__init__(self):
        assert_equal(self.path.base, 'one')
        assert_equal(self.path.parts, ['two', 'three'])

        path = OutputPath('base')
        assert_equal(path.base, 'base')
        assert_equal(path.parts, [])
Exemplo n.º 2
0
 def test_delete(self):
     tmp_dir = mkdtemp()
     path = OutputPath(tmp_dir)
     path.delete()
     assert not os.path.exists(tmp_dir)
Exemplo n.º 3
0
 def setup_path(self):
     self.path = OutputPath('one', 'two', 'three')
Exemplo n.º 4
0
 def test_init_with_output_path(self):
     path = OutputPath(self.test_dir, 'one', 'two', 'three')
     stream = OutputStreamSerializer(path)
     assert_equal(stream.base_path, str(path))