replace text in files crashes if it finds a directory

Bug #788509 reported by Emily Bache on 2011-05-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

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

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/", line 263, in handleExceptions
  File "/opt/texttest/3.20/source/lib/default/", line 242, in __call__
    for line in open(stdFile).xreadlines():
IOError: [Errno 21] Is a directory: '${TEXTTEST_HOME}/myapp/mytest/dir_to_copy'

Geoff Bache (geoff.bache) wrote :

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

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  Edit
Everyone can see this information.

Other bug subscribers