| OLD | NEW |
| 1 # Copyright (c) 2010 Chris Moyer http://coredumped.org/ | 1 # Copyright (c) 2010 Chris Moyer http://coredumped.org/ |
| 2 # | 2 # |
| 3 # Permission is hereby granted, free of charge, to any person obtaining a | 3 # Permission is hereby granted, free of charge, to any person obtaining a |
| 4 # copy of this software and associated documentation files (the | 4 # copy of this software and associated documentation files (the |
| 5 # "Software"), to deal in the Software without restriction, including | 5 # "Software"), to deal in the Software without restriction, including |
| 6 # without limitation the rights to use, copy, modify, merge, publish, dis- | 6 # without limitation the rights to use, copy, modify, merge, publish, dis- |
| 7 # tribute, sublicense, and/or sell copies of the Software, and to permit | 7 # tribute, sublicense, and/or sell copies of the Software, and to permit |
| 8 # persons to whom the Software is furnished to do so, subject to the fol- | 8 # persons to whom the Software is furnished to do so, subject to the fol- |
| 9 # lowing conditions: | 9 # lowing conditions: |
| 10 # | 10 # |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 def test_sequence_string(self): | 100 def test_sequence_string(self): |
| 101 """Test the String incrementation sequence""" | 101 """Test the String incrementation sequence""" |
| 102 from boto.sdb.db.sequence import Sequence,increment_string | 102 from boto.sdb.db.sequence import Sequence,increment_string |
| 103 s = Sequence(fnc=increment_string) | 103 s = Sequence(fnc=increment_string) |
| 104 self.sequences.append(s) | 104 self.sequences.append(s) |
| 105 assert(s.val == "A") | 105 assert(s.val == "A") |
| 106 assert(s.next() == "B") | 106 assert(s.next() == "B") |
| 107 s.val = "Z" | 107 s.val = "Z" |
| 108 assert(s.val == "Z") | 108 assert(s.val == "Z") |
| 109 assert(s.next() == "AA") | 109 assert(s.next() == "AA") |
| OLD | NEW |