avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Lewi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-849) Python unittests don't work if avro is already installed
Date Fri, 01 Jul 2011 16:42:28 GMT

     [ https://issues.apache.org/jira/browse/AVRO-849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jeremy Lewi updated AVRO-849:
-----------------------------

    Attachment: AVRO-849.patch

Here is a patch. 
I created a module avro_849_fix.py which adjusts the path based on the location of the module.
SO unittests  just need to add the following at the top
{noformat}
import avro_849_fix
{noformat}

> Python unittests don't work if avro is already installed
> --------------------------------------------------------
>
>                 Key: AVRO-849
>                 URL: https://issues.apache.org/jira/browse/AVRO-849
>             Project: Avro
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 1.4.1
>            Reporter: Jeremy Lewi
>            Assignee: Jeremy Lewi
>            Priority: Minor
>         Attachments: AVRO-849.patch
>
>
> I think there is a problem running the python unittests if avro is already installed.
If avro is already installed then when we import avro or its subpackages in the unittests
we can end up importing the installed avro instead of the avro version being compiled because
the installed version might be higher on the path.
> One (slightly cumbersome way to fix this) would be to pass the the paths listed in test.path
to our unittests (e.g by using an environment variable). The unittests could then adjust the
path so these directories were highest on the path. The downside of this solution would be
every unittest would need some boilerplate code to adjust the path.
> Does anyone have suggestions about how to pass the values in test.path to our unittests?
I don't know anything about ant, so any help would be appreciated.
> Or does anyone have suggestions about a better solution which doesn't require adjusting
the path in each unittest?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message