From 607db03a1cc08582bdb749baa40cd68b5fb05eea Mon Sep 17 00:00:00 2001 From: soulitzer Date: Wed, 31 Jan 2024 19:13:44 -0500 Subject: [PATCH] fix test --- tests/test_torchfix.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_torchfix.py b/tests/test_torchfix.py index 58e216c..9665991 100644 --- a/tests/test_torchfix.py +++ b/tests/test_torchfix.py @@ -69,12 +69,12 @@ def test_errorcodes_distinct(): def test_parse_error_code_str(): exclude_set = expand_error_codes(tuple(DISABLED_BY_DEFAULT)) cases = [ - ("ALL", list(GET_ALL_ERROR_CODES())), - ("ALL,TOR102", list(GET_ALL_ERROR_CODES())), - ("TOR102", ["TOR102"]), - ("TOR102,TOR101", ["TOR102", "TOR101"]), - ("TOR1,TOR102", ["TOR102", "TOR101"]), - (None, list(GET_ALL_ERROR_CODES() - exclude_set)), + ("ALL", GET_ALL_ERROR_CODES()), + ("ALL,TOR102", GET_ALL_ERROR_CODES()), + ("TOR102", set(["TOR102"])), + ("TOR102,TOR101", set(["TOR102", "TOR101"])), + ("TOR1,TOR102", set(["TOR102", "TOR101"])), + (None, GET_ALL_ERROR_CODES() - exclude_set), ] for case, expected in cases: - assert expected == process_error_code_str(case) + assert expected == set(process_error_code_str(case))