[PR #80] [MERGED] [python] prepend build/lib folder to PYTHONPATH before running tests #679

Open
opened 2026-01-29 20:50:19 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/80
Author: @anthrotype
Created: 4/22/2015
Status: Merged
Merged: 4/23/2015
Merged by: @szabadka

Base: masterHead: test_brotli_py


📝 Commits (2)

  • 906f4f5 [python] prepend build/lib folder to PYTHONPATH before running tests
  • cdde52e [python] refactored tests and import shared utilities from module

📊 Changes

4 files changed (+52 additions, -29 deletions)

View changed files

📝 .gitignore (+3 -1)
📝 python/tests/compatibility_test.py (+5 -13)
📝 python/tests/roundtrip_test.py (+8 -15)
python/tests/test_utils.py (+36 -0)

📄 Description

this allows you to run python setup.py test without first having to install the extension.

$ python setup.py build_ext
$ python setup.py test

It assumes that the extension has was built in the default build base directory, i.e. build/lib.{platform}-{version[0].version[1]}.
I prepend the lib's path to the PYTHONPATH environment variable, and passes the latter to the subprocess running the tests.
Let me know if that was what you had in mind.

Cheers,

Cosimo


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/google/brotli/pull/80 **Author:** [@anthrotype](https://github.com/anthrotype) **Created:** 4/22/2015 **Status:** ✅ Merged **Merged:** 4/23/2015 **Merged by:** [@szabadka](https://github.com/szabadka) **Base:** `master` ← **Head:** `test_brotli_py` --- ### 📝 Commits (2) - [`906f4f5`](https://github.com/google/brotli/commit/906f4f52ab3e3daaf4bb893e69d0bcfee1f49726) [python] prepend build/lib folder to PYTHONPATH before running tests - [`cdde52e`](https://github.com/google/brotli/commit/cdde52ef63d9ef69473cb123b5257770be493117) [python] refactored tests and import shared utilities from module ### 📊 Changes **4 files changed** (+52 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -1) 📝 `python/tests/compatibility_test.py` (+5 -13) 📝 `python/tests/roundtrip_test.py` (+8 -15) ➕ `python/tests/test_utils.py` (+36 -0) </details> ### 📄 Description this allows you to run `python setup.py test` without first having to install the extension. ``` $ python setup.py build_ext $ python setup.py test ``` It assumes that the extension has was built in the default build base directory, i.e. `build/lib.{platform}-{version[0].version[1]}`. I prepend the lib's path to the PYTHONPATH environment variable, and passes the latter to the subprocess running the tests. Let me know if that was what you had in mind. Cheers, Cosimo --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 20:50:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#679