Fix bug in test_pipeline.py