diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-02-02 10:03:18 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-02-02 10:03:18 +1100 |
commit | 734f5a7974e0b82e322ec82f0874cb0f9ccf272a (patch) | |
tree | a251b3bd4118625f6c54de1ed17cc58f465a55fa | |
parent | c41583c56f5dd2213f64293c6b41f5631c8b5157 (diff) | |
download | mongo-734f5a7974e0b82e322ec82f0874cb0f9ccf272a.tar.gz |
Update copyright notices for the BDB stubs and the Python API tests.
--HG--
extra : rebase_source : c270e923e1df304e8190062413a5028ad3da78d4
-rw-r--r-- | dist/s_copyright | 24 | ||||
-rw-r--r-- | lang/python/fpacking.py | 7 | ||||
-rw-r--r-- | lang/python/intpack-test.py | 6 | ||||
-rw-r--r-- | lang/python/intpacking.py | 9 | ||||
-rw-r--r-- | lang/python/packing-test.py | 5 | ||||
-rw-r--r-- | lang/python/packing.py | 7 | ||||
-rw-r--r-- | lang/python/tests/ConnectionTest.py | 45 | ||||
-rw-r--r-- | lang/python/tests/CursorTest.py | 0 | ||||
-rw-r--r-- | lang/python/tests/PackTest.py | 49 | ||||
-rw-r--r-- | lang/python/tests/SessionTest.py | 0 |
10 files changed, 51 insertions, 101 deletions
diff --git a/dist/s_copyright b/dist/s_copyright index 0294737cccc..e5e7313d426 100644 --- a/dist/s_copyright +++ b/dist/s_copyright @@ -8,7 +8,8 @@ c1=__wt.1$$ c2=__wt.2$$ c3=__wt.3$$ -trap 'rm -f c1 c2 c3; exit 0' 0 1 2 3 13 15 +c4=__wt.4$$ +trap 'rm -f $c1 $c2 $c3 $c4; exit 0' 0 1 2 3 13 15 year=`date +%Y` @@ -31,7 +32,16 @@ ENDOFTEXT cat > $c3 <<ENDOFTEXT #! # -# Copyright (c) 2008-2012 WiredTiger, Inc. +# Copyright (c) 2008-$year WiredTiger, Inc. +# All rights reserved. +# +# See the file LICENSE for redistribution information. +ENDOFTEXT + +cat > $c4 <<ENDOFTEXT +#! +# +# Copyright (c) 2008-$year WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. ENDOFTEXT @@ -51,7 +61,11 @@ check() return; fi if `sed -e 's/#!.*/#!/' \ - -e 5q ../$1 | diff - $c3 > /dev/null` ; then + -e 6q ../$1 | diff - $c3 > /dev/null` ; then + return; + fi + if `sed -e 's/#!.*/#!/' \ + -e 5q ../$1 | diff - $c4 > /dev/null` ; then return; fi @@ -63,8 +77,8 @@ l="`cd .. && \ COPYING \ examples/c/*.c \ examples/python/*.py \ - lang/python/tests/*.py \ - src/bdb/bdb.cpp \ + lang/python/*pack*.py \ + src/bdb/*.[ch]* \ src/include/*.[hi] \ src/include/*.in \ src/utilities/*.[ch] \ diff --git a/lang/python/fpacking.py b/lang/python/fpacking.py index 0b7451e3028..adabcfa807e 100644 --- a/lang/python/fpacking.py +++ b/lang/python/fpacking.py @@ -1,3 +1,10 @@ +#!/usr/bin/env python +# +# Copyright (c) 2008-2012 WiredTiger, Inc. +# All rights reserved. +# +# See the file LICENSE for redistribution information. +# # WiredTiger fixed-size packing and unpacking functions, using the Python # struct library. diff --git a/lang/python/intpack-test.py b/lang/python/intpack-test.py index fed11959223..ab74fa457d7 100644 --- a/lang/python/intpack-test.py +++ b/lang/python/intpack-test.py @@ -1,4 +1,10 @@ #!/usr/bin/env python +# +# Copyright (c) 2008-2012 WiredTiger, Inc. +# All rights reserved. +# +# See the file LICENSE for redistribution information. +# from intpacking import compress_int diff --git a/lang/python/intpacking.py b/lang/python/intpacking.py index af6a62fea58..3c94c1e7416 100644 --- a/lang/python/intpacking.py +++ b/lang/python/intpacking.py @@ -1,12 +1,17 @@ #!/usr/bin/env python +# +# Copyright (c) 2008-2012 WiredTiger, Inc. +# All rights reserved. +# +# See the file LICENSE for redistribution information. import math, struct # Variable-length integer packing # need: up to 64 bits, both signed and unsigned # -# First attempt: try hard for small values (up to ~2 bytes), after that, just -# encode the length in the first byte. +# Try hard for small values (up to ~2 bytes), after that, just encode the +# length in the first byte. # # First byte | Next | | # byte | bytes| Min Value | Max Value diff --git a/lang/python/packing-test.py b/lang/python/packing-test.py index 83d3027f7f8..065e26e029b 100644 --- a/lang/python/packing-test.py +++ b/lang/python/packing-test.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +# +# Copyright (c) 2008-2012 WiredTiger, Inc. +# All rights reserved. +# +# See the file LICENSE for redistribution information. from packing import pack, unpack diff --git a/lang/python/packing.py b/lang/python/packing.py index 720b48d50b8..a642f70ba75 100644 --- a/lang/python/packing.py +++ b/lang/python/packing.py @@ -1,3 +1,10 @@ +#!/usr/bin/env python +# +# Copyright (c) 2008-2012 WiredTiger, Inc. +# All rights reserved. +# +# See the file LICENSE for redistribution information. +# # WiredTiger variable-length packing and unpacking functions from intpacking import pack_int, unpack_int diff --git a/lang/python/tests/ConnectionTest.py b/lang/python/tests/ConnectionTest.py deleted file mode 100644 index f65c8c4ad7e..00000000000 --- a/lang/python/tests/ConnectionTest.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2008-2012 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# Python unit tests for the wiredtiger.Connection class. - -from wiredtiger import Connection - -try: - import unittest2 as unittest -except ImportError: - import unittest - -class TestConnections(unittest.TestCase): - def setUp(self): - pass - - def test_open(self): - c = Connection('file:/testdb') - -if __name__ == '__main__': - unittest.main() diff --git a/lang/python/tests/CursorTest.py b/lang/python/tests/CursorTest.py deleted file mode 100644 index e69de29bb2d..00000000000 --- a/lang/python/tests/CursorTest.py +++ /dev/null diff --git a/lang/python/tests/PackTest.py b/lang/python/tests/PackTest.py deleted file mode 100644 index ac5289ca867..00000000000 --- a/lang/python/tests/PackTest.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) 2008-2012 WiredTiger, Inc. -# -# This is free and unencumbered software released into the public domain. -# -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. -# -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# Python unit tests for the wiredtiger.*pack* methods. - -from wiredtiger import pack, unpack - -try: - import unittest2 as unittest -except ImportError: - import unittest - -class TestPacking(unittest.TestCase): - def setUp(self): - pass - - def test_simple(self): - for b in (0, 10, 65): - self.assertEqual(pack('b', b), chr(b)) - for b in (0, 10, 65, 255): - self.assertEqual(pack('B', b), chr(b)) - self.assertEqual(pack('c', chr(b)), chr(b)) - -if __name__ == '__main__': - unittest.main() diff --git a/lang/python/tests/SessionTest.py b/lang/python/tests/SessionTest.py deleted file mode 100644 index e69de29bb2d..00000000000 --- a/lang/python/tests/SessionTest.py +++ /dev/null |