1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-03-30 16:06:44 +00:00

BIP-374: avoid using sys.path[0] to find current working directory

This approach is incompatible with the sys.path extension approach
in the next commit which is used to to find the vendored copy of
secp256k1lab, so use __file__ instead which works as well.
This commit is contained in:
Sebastian Falbesoner
2025-05-20 21:49:11 +02:00
parent d2ceae1dd6
commit 4e18ee641b
2 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Run the BIP-DLEQ test vectors."""
import csv
import os
from pathlib import Path
import sys
from reference import (
dleq_generate_proof,
@@ -10,8 +10,8 @@ from reference import (
from secp256k1 import GE
FILENAME_GENERATE_PROOF_TEST = os.path.join(sys.path[0], 'test_vectors_generate_proof.csv')
FILENAME_VERIFY_PROOF_TEST = os.path.join(sys.path[0], 'test_vectors_verify_proof.csv')
FILENAME_GENERATE_PROOF_TEST = Path(__file__).parent / 'test_vectors_generate_proof.csv'
FILENAME_VERIFY_PROOF_TEST = Path(__file__).parent / 'test_vectors_verify_proof.csv'
all_passed = True