Terry Reedy wrote:
> If the testdir disallows the search indexer, then there should be no need 
> to disable Windows Search Service.  If privatizing the dir kept other 
> programs out, then likewise.
> 
> | Or were you suggesting that there is some programmatic way for the
> | test suite to create directories that disallow the Search Service,
> | etc.?
> 
> I suspect, but do not know, that the dialog box effects changes through 
> user-programmable interfaces.  So while I would start with manual changes 
> to see if that solves the problem, I presume there must be a system call 
> for changing dir attributes.

The problem is, I think, that it isn't just the Indexing Service
which generates this issue. TortoiseSVN is well known for doing
the same thing, and there could be now and potentially will be
in the future other programs. I don't think that hunting down
and turning off their interference case by case is a viable
solution in the long-term. Although it would obviously be a
way forward in the short term, _faute de mieux_.

[Tony Nelson]
> I'd think that files and directories created in the TEMP
> directory would normally not be indexed on any OS, including
> MSWindows. But this is just a guess.

I'm inclined to think you're right. And a first pass I had at
producing a solution simply used tempfile to do everything.
Unfortunately that's far more invasive than I was really
comfortable with at the time: at the very least, you have
to patch several tests which fail if there's an (escaped)
backslash in the path.

However, it's clear that my attempt to cause the minimum damage
isn't enough to clear the problem 100%. So I think the next move
is indeed to turn test_support.TESTFN into a function (in some
way) which generates a unique tempfile reference, possibly with
a context manager to clean up. Or something.

The complication is that, while most test simply want a handy
file to exist or be written to, and don't really care what
happens afterwards, some tests are testing the very mechanism
of creating/deleting a file etc. So a wholesale replacement
isn't necessarily straightforward.

On we go.

TJG

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to