replace text in files crashes if it finds a directory

Bug #788509 reported by Emily Bache
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TextTest
Fix Released
Undecided
Unassigned

Bug Description

My tests use "copy_test_path" to copy a whole directory structure into the test sandbox.
eg
copy_test_path:dir_to_copy

I want to update the text in one of the files in this directory. Each test has a different copy of this file under a directory with the same name. I tried to use the feature "replace text in files" from the actions menu. I entered the text to replace but didn't know what to write in "File stem(s) to perform replacement in" so I put *. When I ran it, texttest gave this exception:

Test could not be run :
Traceback (most recent call last):
  File "/opt/texttest/3.20/source/lib/default/actionrunner.py", line 263, in handleExceptions
    method(*args)
  File "/opt/texttest/3.20/source/lib/default/scripts.py", line 242, in __call__
    for line in open(stdFile).xreadlines():
IOError: [Errno 21] Is a directory: '${TEXTTEST_HOME}/myapp/mytest/dir_to_copy'

Revision history for this message
Geoff Bache (geoff.bache) wrote :

Does it work if you run it with "dir_to_copy/*" instead?

Revision history for this message
Geoff Bache (geoff.bache) wrote :

Now ignores directories. The command you gave wouldn't have worked anyway though, you needed to do as suggested in the previous comment.

Changed in texttest:
status: New → Fix Committed
Changed in texttest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.