CementTestCase do not delete temporary file and directory #363

Closed
akhilman opened this Issue May 12, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@akhilman
Contributor

akhilman commented May 12, 2016

I would like to add tearDown to CementTestCase wich will delete self.tmp_file and self.tmp_dir.

Also we can use app label as mkdtemp/mkstemp's prefix

akhilman added a commit to akhilman/cement that referenced this issue May 12, 2016

Removing temporary file/dir in test's tearDown
Fixes issue #363
Removing temporary file/dir to prevent cluttering up tmp directory.
Also adding app label as prefixes to temporary file/dir, just for
esthetic.

akhilman added a commit to akhilman/cement that referenced this issue May 12, 2016

Removing temporary file/dir in test's tearDown
Fixes issue #363
Removing temporary file/dir to prevent cluttering up tmp directory.
Also adding app label as prefixes to temporary file/dir, just for
esthetic.

akhilman added a commit to akhilman/cement that referenced this issue Jun 14, 2016

Removing temporary file/dir in test's tearDown
Fixes issue #363
Removing temporary file/dir to prevent cluttering up tmp directory.
Also adding app label as prefixes to temporary file/dir, just for
esthetic.

akhilman added a commit to akhilman/cement that referenced this issue Jun 14, 2016

Removing temporary file/dir in test's tearDown
Fixes issue #363
Removing temporary file/dir to prevent cluttering up tmp directory.
Also adding app label as prefixes to temporary file/dir, just for
esthetic.

akhilman added a commit to akhilman/cement that referenced this issue Jun 14, 2016

Removing temporary file/dir in test's tearDown
Fixes issue #363
Removing temporary file/dir to prevent cluttering up tmp directory.
Also adding app label as prefixes to temporary file/dir, just for
esthetic.

@derks derks self-assigned this Jun 14, 2016

@derks derks added this to the 2.10.0 Stable milestone Jun 14, 2016

@derks

This comment has been minimized.

Show comment
Hide comment
@derks

derks Jun 14, 2016

Member

Not sure why the pull-request broke... it look'd OK. I'll work this into next release though.

Member

derks commented Jun 14, 2016

Not sure why the pull-request broke... it look'd OK. I'll work this into next release though.

@akhilman

This comment has been minimized.

Show comment
Hide comment
@akhilman

akhilman Jun 15, 2016

Contributor

@derks in many unittests there is overloaded setUp() but inherited tearDown(), tearDown() tries to delete files that not created by overloaded setUp().

To make this PR work we should ether overload both setUp() and tearDown(), or insert super().setUp() to all overloaded setUp()'s.

Contributor

akhilman commented Jun 15, 2016

@derks in many unittests there is overloaded setUp() but inherited tearDown(), tearDown() tries to delete files that not created by overloaded setUp().

To make this PR work we should ether overload both setUp() and tearDown(), or insert super().setUp() to all overloaded setUp()'s.

@akhilman

This comment has been minimized.

Show comment
Hide comment
@akhilman

akhilman Jun 15, 2016

Contributor

And excuse me for garbage, I not very experienced in git and playing not well with it.

Contributor

akhilman commented Jun 15, 2016

And excuse me for garbage, I not very experienced in git and playing not well with it.

akhilman added a commit to akhilman/cement that referenced this issue Jul 7, 2016

Removing temporary file/dir in test's tearDown
Fixes issue #363
Removing temporary file/dir to prevent cluttering up tmp directory.
Also adding app label as prefixes to temporary file/dir, just for
esthetic.

derks added a commit that referenced this issue Jul 7, 2016

@derks derks closed this Jul 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment