MCPcopy Index your code
hub / github.com/kyclark/tiny_python_projects / test_scramble

Function test_scramble

16_scrambler/solution.py:60–72  ·  view source on GitHub ↗

Test scramble

()

Source from the content-addressed store, hash-verified

58
59# --------------------------------------------------
60def test_scramble():
61 """Test scramble"""
62
63 state = random.getstate()
64 random.seed(1)
65 assert scramble("a") == "a"
66 assert scramble("ab") == "ab"
67 assert scramble("abc") == "abc"
68 assert scramble("abcd") == "acbd"
69 assert scramble("abcde") == "acbde"
70 assert scramble("abcdef") == "aecbdf"
71 assert scramble("abcde'f") == "abcd'ef"
72 random.setstate(state)
73
74
75# --------------------------------------------------

Callers

nothing calls this directly

Calls 1

scrambleFunction · 0.85

Tested by

no test coverage detected