Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-portable paths in rnp client tests (Python) #2150

Open
maxirmx opened this issue Nov 17, 2023 · 0 comments
Open

Non-portable paths in rnp client tests (Python) #2150

maxirmx opened this issue Nov 17, 2023 · 0 comments

Comments

@maxirmx
Copy link
Member

maxirmx commented Nov 17, 2023

Current state and the issue

gpg built for Msys environment 'understands' MSys paths only, i.e.: '''C:\Program Files\PostgreSQL\12''' shall be ```/c/Program Files/PostgreSQL/12/'''

gpg build for Windows environment works with true Windows paths only, i.e.: C:/Program Files/PostgreSQL/12/''' shall be C:\Program Files\PostgreSQL\12''' (most of Windows programs allow to mix forward and back slashes, but not gpg)

rnp client tests (Python) include multiple definitions like

 ret, _, _ = run_proc(RNPK, ['--import', data_path('test_key_edge_cases/key-eddsa-small-x-pub.asc')])

that create Unix-style paths' fragments on Windows that

  1. forces to use MSys environment even for native Windows tests
  2. makes it practically impossible to use debugger in Windows environment

Proposed fix

 ret, _, _ = run_proc(RNPK, ['--import', data_path('test_key_edge_cases/key-eddsa-small-x-pub.asc')])

shall be

 ret, _, _ = run_proc(RNPK, ['--import', data_path(os.path.join('test_key_edge_cases', 'key-eddsa-small-x-pub.asc')])

(~50 locations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant