C": 25.0, "F": 77.0, "K": 298.15}), ("celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("FAHRENHEIT", {"C": -3.89, "F": 25.0, "K": 269.26}), ("kelvin", {"C": -248.15, "F": -414.67, "K": 25.0}), ], ) def test_full_unit_name_is_accepted(unit, expected_targets): value = "25" r = _run([value, unit]) > assert r.returncode == 0, ( f"'{unit}' birim adi reddedildi; cikti={r.stdout!r} hata={r.stderr!r}" ) E AssertionError: 'Celsius' birim adi reddedildi; cikti='' hata="Geçersiz birim 'Celsius'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n" E assert 2 == 0 E + where 2 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', '25', 'Celsius'], returncode=2, stdout='', stderr="Geçersiz birim 'Celsius'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n").returncode tests/test_review_sicaklik.py:46: AssertionError __________ test_full_unit_name_is_accepted[celsius-expected_targets1] __________ unit = 'celsius', expected_targets = {'C': 25.0, 'F': 77.0, 'K': 298.15} @pytest.mark.parametrize( "unit,expected_targets", [ ("Celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("FAHRENHEIT", {"C": -3.89, "F": 25.0, "K": 269.26}), ("kelvin", {"C": -248.15, "F": -414.67, "K": 25.0}), ], ) def test_full_unit_name_is_accepted(unit, expected_targets): value = "25" r = _run([value, unit]) > assert r.returncode == 0, ( f"'{unit}' birim adi reddedildi; cikti={r.stdout!r} hata={r.stderr!r}" ) E AssertionError: 'celsius' birim adi reddedildi; cikti='' hata="Geçersiz birim 'celsius'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n" E assert 2 == 0 E + where 2 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', '25', 'celsius'], returncode=2, stdout='', stderr="Geçersiz birim 'celsius'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n").returncode tests/test_review_sicaklik.py:46: AssertionError ________ test_full_unit_name_is_accepted[FAHRENHEIT-expected_targets2] _________ unit = 'FAHRENHEIT', expected_targets = {'C': -3.89, 'F': 25.0, 'K': 269.26} @pytest.mark.parametrize( "unit,expected_targets", [ ("Celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("FAHRENHEIT", {"C": -3.89, "F": 25.0, "K": 269.26}), ("kelvin", {"C": -248.15, "F": -414.67, "K": 25.0}), ], ) def test_full_unit_name_is_accepted(unit, expected_targets): value = "25" r = _run([value, unit]) > assert r.returncode == 0, ( f"'{unit}' birim adi reddedildi; cikti={r.stdout!r} hata={r.stderr!r}" ) E AssertionError: 'FAHRENHEIT' birim adi reddedildi; cikti='' hata="Geçersiz birim 'FAHRENHEIT'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n" E assert 2 == 0 E + where 2 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', '25', 'FAHRENHEIT'], returncode=2, stdout='', stderr="Geçersiz birim 'FAHRENHEIT'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n").returncode tests/test_review_sicaklik.py:46: AssertionError __________ test_full_unit_name_is_accepted[kelvin-expected_targets3] ___________ unit = 'kelvin', expected_targets = {'C': -248.15, 'F': -414.67, 'K': 25.0} @pytest.mark.parametrize( "unit,expected_targets", [ ("Celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("celsius", {"C": 25.0, "F": 77.0, "K": 298.15}), ("FAHRENHEIT", {"C": -3.89, "F": 25.0, "K": 269.26}), ("kelvin", {"C": -248.15, "F": -414.67, "K": 25.0}), ], ) def test_full_unit_name_is_accepted(unit, expected_targets): value = "25" r = _run([value, unit]) > assert r.returncode == 0, ( f"'{unit}' birim adi reddedildi; cikti={r.stdout!r} hata={r.stderr!r}" ) E AssertionError: 'kelvin' birim adi reddedildi; cikti='' hata="Geçersiz birim 'kelvin'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n" E assert 2 == 0 E + where 2 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', '25', 'kelvin'], returncode=2, stdout='', stderr="Geçersiz birim 'kelvin'. C (Celsius), F (Fahrenheit) veya K (Kelvin) kullanın.\n").returncode tests/test_review_sicaklik.py:46: AssertionError ______________ test_large_value_printed_as_short_readable_number _______________ def test_large_value_printed_as_short_readable_number(): r = _run(["1e400", "C"]) assert r.returncode == 0, r.stderr for line in _lines(r.stdout): # Iki ondalikli, okunabilir bir sayi beklenir; yuzlerce basamak degil. > assert len(line) <= 40, f"asiri uzun satir ({len(line)} karakter): {line[:60]}..." E AssertionError: asiri uzun satir (412 karakter): 100000000000000000000000000000000000000000000000000000000000... E assert 412 <= 40 E + where 412 = len('100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00 Celsius') tests/test_review_sicaklik.py:67: AssertionError __________________ test_decimal_comma_is_parsed[36,6-C-36.6] ___________________ value = '36,6', unit = 'C', celsius = 36.6 @pytest.mark.parametrize( "value,unit,celsius", [("36,6", "C", 36.6), ("1.234,5", "C", 1234.5)], ) def test_decimal_comma_is_parsed(value, unit, celsius): r = _run([value, unit]) > assert r.returncode == 0, f"'{value}' sayi olarak alinmadi; hata={r.stderr!r}" E AssertionError: '36,6' sayi olarak alinmadi; hata="Geçersiz sayı '36,6'. 36.6 gibi sonlu bir sayı girin.\n" E assert 2 == 0 E + where 2 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', '36,6', 'C'], returncode=2, stdout='', stderr="Geçersiz sayı '36,6'. 36.6 gibi sonlu bir sayı girin.\n").returncode tests/test_review_sicaklik.py:80: AssertionError ________________ test_decimal_comma_is_parsed[1.234,5-C-1234.5] ________________ value = '1.234,5', unit = 'C', celsius = 1234.5 @pytest.mark.parametrize( "value,unit,celsius", [("36,6", "C", 36.6), ("1.234,5", "C", 1234.5)], ) def test_decimal_comma_is_parsed(value, unit, celsius): r = _run([value, unit]) > assert r.returncode == 0, f"'{value}' sayi olarak alinmadi; hata={r.stderr!r}" E AssertionError: '1.234,5' sayi olarak alinmadi; hata="Geçersiz sayı '1.234,5'. 36.6 gibi sonlu bir sayı girin.\n" E assert 2 == 0 E + where 2 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', '1.234,5', 'C'], returncode=2, stdout='', stderr="Geçersiz sayı '1.234,5'. 36.6 gibi sonlu bir sayı girin.\n").returncode tests/test_review_sicaklik.py:80: AssertionError ----------------- generated xml file: /work/creovum-report.xml ----------------- =========================== short test summary info ============================ FAILED tests/test_review_sicaklik.py::test_full_unit_name_is_accepted[Celsius-expected_targets0] FAILED tests/test_review_sicaklik.py::test_full_unit_name_is_accepted[celsius-expected_targets1] FAILED tests/test_review_sicaklik.py::test_full_unit_name_is_accepted[FAHRENHEIT-expected_targets2] FAILED tests/test_review_sicaklik.py::test_full_unit_name_is_accepted[kelvin-expected_targets3] FAILED tests/test_review_sicaklik.py::test_large_value_printed_as_short_readable_number FAILED tests/test_review_sicaklik.py::test_decimal_comma_is_parsed[36,6-C-36.6] FAILED tests/test_review_sicaklik.py::test_decimal_comma_is_parsed[1.234,5-C-1234.5] 7 failed, 48 passed in 3.26s