Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use os.fdopen instead of close + open

  • Loading branch information...
commit 531ff9809c6b55a5b2b2c6819da26ec443a93797 1 parent 105c61c
@priteau priteau authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 ceiclient/tests/test_integration.py
View
6 ceiclient/tests/test_integration.py
@@ -126,15 +126,13 @@ def test_process_definitions(self):
class: something
module: else"""
fh, definition_file_path = tempfile.mkstemp()
- os.close(fh)
- with open(definition_file_path, 'w') as d:
+ with os.fdopen(fh, 'w') as d:
d.write(definition)
definition_name = "proc"
process_config = "{}"
fh, process_config_path = tempfile.mkstemp()
- os.close(fh)
- with open(process_config_path, 'w') as p:
+ with os.fdopen(fh, 'w') as p:
p.write(process_config)
cmd = "ceictl -x %s process-definition create -i %s %s" % (
Please sign in to comment.
Something went wrong with that request. Please try again.