pynguin: TypeError: unsupported operand type(s) for |: 'NoneType' and 'NoneType'
Describe the bug
Error when generating tests: TypeError: unsupported operand type(s) for |: 'NoneType' and 'NoneType'
To Reproduce Steps to reproduce the behaviour:
- Use Pynguin version ‘0.34.0’
- Use the following (minimal) code as a subject for test generation:
import os
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
class FilterCorrelatedFeatures:
def __init__(self, corr_threshold=0.80):
self.corr_threshold = corr_threshold
self.correlated_features = []
self.corr_matrix = pd.DataFrame()
-
Use the following command line arguments to Pynguin:
python -m pynguin --output-path . -v --project-path src/data_preprocessing/ --module-name hello -
Give the error (stack trace, etc) you are encountering: ‘…’ pynguin-log.txt
Expected behavior generate a simple test.
Screenshots NA
Software Version (please complete the following information):
- OS: [Ubuntu 20.04.6 LTS]
- Python version [3.10.13]
- Pynguin Version [0.34.0]
About this issue
- Original URL
- State: open
- Created 7 months ago
- Comments: 19 (7 by maintainers)
OK, I can reproduce the issue on Linux, when using the Python, numpy, and pandas versions you’ve mentioned. I’ll keep you updated.
I was able to reproduce and fix this particular issue in d811cacc59f73c84e9cd83ceb466ec308c66410b. However, there is yet another issue (at least on my machine) that causes failure: some
numpymodule cannot be found for whatever reason I do not really understand.Code that uses
numpyorpandasstill causes struggles to Pynguin for various reasons, unfortunately.