()
| 357 | |
| 358 | |
| 359 | def test_option(): |
| 360 | o = optmanager._Option("test", int, 1, "help", None) |
| 361 | assert o.current() == 1 |
| 362 | with pytest.raises(TypeError): |
| 363 | o.set("foo") |
| 364 | with pytest.raises(TypeError): |
| 365 | optmanager._Option("test", str, 1, "help", None) |
| 366 | |
| 367 | o2 = optmanager._Option("test", int, 1, "help", None) |
| 368 | assert o2 == o |
| 369 | o2.set(5) |
| 370 | assert o2 != o |
| 371 | |
| 372 | |
| 373 | def test_dump_defaults(): |