On 03/27/2012 01:57 PM, Petr Viktorin wrote:
Seeing this, I definitely recommend putting po_file_iterate in an
importable package.


Of course I considered that. Clearly not any existing top level directory in the tree, those are reserved for what we install and what is "import visible" after installation.

Test utility code should not be installed with our normal modules and packages.

It has to be importable from both the install/po area and the test area.

It can't depend on nosetests setting the import path prior to execution (because only the unit tests are run via nose).

So we could create a directory tests/util which hosts utilities used for test code and locate it there. I did consider that, it would be (somewhat) cleaner.

But unless I'm missing something someone is going to have to modify the include path prior to importing any test utility code. It just becomes a question of where the file is located. I'd be happy to move the bulk of the logic into tests/util/i18n.py, but to import it the importing code is going to have to add tests/util to the import path, which puts you pretty much back into the original situation, just with a different path (albeit perhaps a more logical cleaner path).


--
John Dennis <jden...@redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to