I'm writing unit tests for my module and I'd like to do this simple check:
self.assertIs(self.board, wi.board_id)
but I get the aforementioned error. Though, self.assertEqual() works. Is it safe to use assertEqual() for such a test?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I'm writing unit tests for my module and I'd like to do this simple check:
self.assertIs(self.board, wi.board_id)
but I get the aforementioned error. Though, self.assertEqual() works. Is it safe to use assertEqual() for such a test?
assertEqual(a, b) a == b
assertIs(a, b) a is b
So yes, It is safe use assertEquals. If hoy take a look to Odoo test, equals is used a lot.
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrácia| Related Posts | Replies | Zobrazenia | Aktivita | |
|---|---|---|---|---|
|
0
okt 23
|
1814 | |||
|
0
okt 23
|
2968 | |||
|
0
nov 20
|
3548 | |||
|
2
okt 23
|
3304 | |||
|
0
jún 23
|
4395 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.