1. Avro
  2. AVRO-849

Python unittests don't work if avro is already installed


    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: python
    • Labels:
    • Tags:
      python, unittests


      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?

      1. AVRO-849.patch
        4 kB
        Jeremy Lewi
      2. AVRO-849.patch
        3 kB
        Jeremy Lewi


        Jeremy Lewi created issue -
        Jeremy Lewi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jeremy Lewi made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Jeremy Lewi made changes -
        Attachment AVRO-849.patch [ 12484901 ]
        Jeremy Lewi made changes -
        Attachment AVRO-849.patch [ 12492899 ]
        Jeremy Lewi made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]


          • Assignee:
            Jeremy Lewi
            Jeremy Lewi
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: