コード例 #1
0
ファイル: filehandler_test.py プロジェクト: yenNSTH/Tron
    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, [])
コード例 #2
0
ファイル: filehandler_test.py プロジェクト: yenNSTH/Tron
 def test_delete(self):
     tmp_dir = mkdtemp()
     path = OutputPath(tmp_dir)
     path.delete()
     assert not os.path.exists(tmp_dir)
コード例 #3
0
ファイル: filehandler_test.py プロジェクト: yenNSTH/Tron
 def setup_path(self):
     self.path = OutputPath('one', 'two', 'three')
コード例 #4
0
ファイル: filehandler_test.py プロジェクト: yenNSTH/Tron
 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))