---
title: "Discussion on \"unittest param order is the opposite of Jest\" | Hashnode"
description: "Discussion on \"unittest param order is the opposite of Jest\". which is the opposite order for Jestexpect(myVar).toBe(42)\nassumes the first is expected, second is actual in the error message.\nself.assertEqual(expected, actual)\nself.assertEqual(42, my_var)\n\nPyCharm even displays Expected and Actual\nFailure\nExpect..."
url: "https://hashnode.com/posts/unittest-param-order-is-the-opposite-of-jest/66229c5de158a5b300ec6abe"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [unittest param order is the opposite of Jest](https://fullchee.hashnode.dev/unittest-param-order-is-the-opposite-of-jest?utm_source=hashnode&utm_medium=feed)

which is the opposite order for Jestexpect(myVar).toBe(42) assumes the first is expected, second is actual in the error message. self.assertEqual(expected, actual) self.assertEqual(42, my\_var) PyCharm even displays Expected and Actual Failure Expect...

Apr 19, 2024 · 1 min read · fullchee.hashnode.dev  
Read the article

-   [#til](https://hashnode.com/tag/til)
-   [#python](https://hashnode.com/tag/python)
-   [#unit-test](https://hashnode.com/tag/unit-test)
-   [#pytest](https://hashnode.com/tag/pytest)

## Written by

[Fullchee Zhang](https://hashnode.com/@Fullchee)

@Fullchee · Toronto, Canada

  
[View profile](https://hashnode.com/@Fullchee)

Full Stack Dev at Forma AI

React, Django and SQL developer at Forma.ai

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
