Skip to content

Commit

Permalink
Proper decoding of stdout
Browse files Browse the repository at this point in the history
Instead of hacky parsing of the output it is properly decoded now and tidy up comments.
  • Loading branch information
BreadGenie committed Jun 12, 2021
1 parent 7b95f5a commit cc0c4ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/test_condensed_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
# SPDX-License-Identifier: GPL-3.0-or-later

"""
Condensed Downloads Test
Test to check if condensed downloads are committed
"""
import importlib
import subprocess
from test.test_data import __all__ as all_test_name

import pytest


# Test to check condensed files are commited according to the package test data of checkers
# Test to check condensed files are committed according to the package test data of checkers
def test_condensed_downloads():
test_data = list(
map(lambda x: importlib.import_module(f"test.test_data.{x}"), all_test_name)
Expand All @@ -30,8 +28,8 @@ def test_condensed_downloads():
stdout=subprocess.PIPE,
)

condensed_downloads = str(condensed_downloads.stdout)[2:-1].split("\\n")
condensed_downloads = condensed_downloads.stdout.decode("utf-8")

assert all(
item in condensed_downloads for item in package_names
), "Condensed downloads not commited"
), "Condensed downloads are not commited"

0 comments on commit cc0c4ba

Please sign in to comment.