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, [])
def test_delete(self): tmp_dir = mkdtemp() path = OutputPath(tmp_dir) path.delete() assert not os.path.exists(tmp_dir)
def setup_path(self): self.path = OutputPath('one', 'two', 'three')
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))