Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Nov 25, 2021
1 parent 20f8e97 commit 764020f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ def test_get_package_details():
dependencies (such as pip itself being a different version in build systems),
so we simply assert that certain attributes exist for a package such as `pytest`.
"""
python_version = sys.version.split(' ')[0][:3] # Get the Python version of the invoking process of the tests
# Get the Python version of the invoking process of the tests
full_python_version = sys.version.split(' ')[0] # eg: 3.10.0
python_version_numbers = [number for number in full_python_version.split('.')] # eg: [3, 10, 0]
python_version = '.'.join(python_version_numbers[:-1]) # eg: 3.10

pip_path = f'./venv/lib/python{python_version}/site-packages'
package_details, package_count = pip_tree.generate_pip_tree(pip_path)

Expand Down

0 comments on commit 764020f

Please sign in to comment.