python/osmo-python-tests[master]: Fix absolute import issue in py3

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Jan 15 11:50:43 UTC 2018


Patch Set 2: Code-Review+2

(1 comment)

I have reservations but if this fixes the build... you decide

https://gerrit.osmocom.org/#/c/5777/2/tests/test_py3.py
File tests/test_py3.py:

Line 8: # from ..osmopy.osmo_ipa import Ctrl
In osmo-gsm-tester we use 'from . import foo'.

Also possible could be a symlink
  
  ln -s ../osmopy .

which would allow 'from osmopy', as we use in the scripts/ subdir.

Also possible would be invoking the script with a PYTHONPATH env variable set.

I'd prefer either of those to mangling the python path ... I know I also did that some while back in some vty tests py scripts in openbsc.git IIRC, but I didn't know better back then.


-- 
To view, visit https://gerrit.osmocom.org/5777
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ac3c0d45fb2e1d18646048703ac405be1c7e539
Gerrit-PatchSet: 2
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list