Skip to content

pytest-selfie: FS.assertFailed #299

@nedtwigg

Description

@nedtwigg

This is FSJava as supplied by the junit5 runner

https://github.com/diffplug/selfie-python-wip/blob/e6c59053316e3492b3552a5dcf54c9ba598ee7e3/jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SnapshotSystemJUnit5.kt#L57-L59

And this is FSOkio as supplied by the kotest runner

https://github.com/diffplug/selfie-python-wip/blob/e6c59053316e3492b3552a5dcf54c9ba598ee7e3/jvm/selfie-runner-kotest/src/commonMain/kotlin/com/diffplug/selfie/kotest/FSOkio.kt#L44-L63

The key thing to note here is that the exception has two cases:

  • expected and actual both null -> can be a regular AssertionError
  • should be an equals assertion:
    • unittest -> self.assertEqual(expected, actual, msg)
    • pytest -> assert expected == actual, msg

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions