()
| 106 | |
| 107 | |
| 108 | def test_singleton_expr(): |
| 109 | assert MySingleton(1, 2) is MySingleton(1, 2) |
| 110 | # We don't want to deduplicate if there is an __init__ since that may |
| 111 | # mutate our singleton reference and we have no way to know |
| 112 | assert MySingletonWithCustomInit(1, 2) is not MySingletonWithCustomInit(1, 2) |
| 113 | assert MySingletonInheritsCustomInit(1, 2) is not MySingletonInheritsCustomInit( |
| 114 | 1, 2 |
| 115 | ) |
| 116 | assert MySingletonInheritsCustomInitAsMixin( |
| 117 | 1, 2 |
| 118 | ) is not MySingletonInheritsCustomInitAsMixin(1, 2) |
| 119 | |
| 120 | |
| 121 | @pytest.mark.slow() |
nothing calls this directly
no test coverage detected