diff options
author | Olle Lundberg <geek@nerd.sh> | 2014-08-14 15:13:58 +0200 |
---|---|---|
committer | Olle Lundberg <geek@nerd.sh> | 2014-08-14 15:16:42 +0200 |
commit | 2dec0a7671d83f21a290e1a2b3ea9159da45757a (patch) | |
tree | a6419ca78b85f19509eb9f099cecab2ad962fe62 /tests | |
parent | b5c537c4c88cc39323717531a46a3241eb7ca7f5 (diff) |
Add a utility method for value clamping.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index 69c75518..24f58076 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -333,3 +333,8 @@ IdentityFile something_%l_using_fqdn """ config = paramiko.util.parse_ssh_config(StringIO(test_config)) assert config.lookup('meh') # will die during lookup() if bug regresses + + def test_12_clamp_value(self): + self.assertEqual(32768, paramiko.util.clamp_value(32767, 32768, 32769)) + self.assertEqual(32767, paramiko.util.clamp_value(32767, 32765, 32769)) + self.assertEqual(32769, paramiko.util.clamp_value(32767, 32770, 32769)) |