Skip to content

Commit

Permalink
Remove uses of universal newlines mode; fix logger.warn -> logger.war…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
mdickinson committed May 22, 2014
1 parent 83eb368 commit 7a25c88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion traits/util/deprecated.py
Expand Up @@ -25,7 +25,7 @@ def wrapper(*args, **kw):
function_name = fn.__name__

if (module_name, function_name) not in _cache:
logging.getLogger(module_name).warn(
logging.getLogger(module_name).warning(
'DEPRECATED: %s.%s, %s' % (
module_name, function_name, message
)
Expand Down
4 changes: 2 additions & 2 deletions traits/util/tests/test_record_containers.py
Expand Up @@ -39,7 +39,7 @@ def test_record_container(self):
# save records
container.save_to_file(self.filename)

with open(self.filename, 'Ur') as handle:
with open(self.filename, 'r') as handle:
lines = handle.readlines()
self.assertEqual(lines, ['\n'] * 7)

Expand Down Expand Up @@ -69,7 +69,7 @@ def record(container):
container.save_to_directory(self.directory)
for name in container._record_containers:
filename = os.path.join(self.directory, '{0}.trace'.format(name))
with open(filename, 'Ur') as handle:
with open(filename, 'r') as handle:
lines = handle.readlines()
self.assertEqual(lines, ['\n'])

Expand Down
6 changes: 3 additions & 3 deletions traits/util/tests/test_record_events.py
Expand Up @@ -59,7 +59,7 @@ def test_change_event_recorder(self):

filename = os.path.join(self.directory, 'MainThread.trace')
container.save_to_file(filename)
with open(filename, 'Ur') as handle:
with open(filename, 'r') as handle:
lines = handle.readlines()
self.assertEqual(len(lines), 4)
# very basic checking
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_multi_thread_change_event_recorder(self):
container.save_to_directory(self.directory)
for name in container._record_containers:
filename = os.path.join(self.directory, '{0}.trace'.format(name))
with open(filename, 'Ur') as handle:
with open(filename, 'r') as handle:
lines = handle.readlines()
self.assertEqual(len(lines), 4)
# very basic checking
Expand Down Expand Up @@ -118,7 +118,7 @@ def test_record_events(self):
container.save_to_directory(self.directory)
for name in container._record_containers:
filename = os.path.join(self.directory, '{0}.trace'.format(name))
with open(filename, 'Ur') as handle:
with open(filename, 'r') as handle:
lines = handle.readlines()
self.assertEqual(len(lines), 4)
# very basic checking
Expand Down

0 comments on commit 7a25c88

Please sign in to comment.