@@ -0,0 +1,2921 @@
+# -*- coding: utf-8 -*-%0A%0Afrom __future__ import absolute_import%0A%0Afrom sentry.options.types import (%0A    InvalidTypeError,%0A    Any, Bool, Int, Float, String, Dict, Sequence,%0A)%0Afrom sentry.testutils import TestCase%0A%0A%0Aclass OptionsTypesTest(TestCase):%0A    def test_any(self):%0A        assert Any('foo') == 'foo'%0A        assert Any(1) == 1%0A        assert Any(None) is None%0A        assert Any() is None%0A        assert Any.test(None)%0A        assert Any.test('foo')%0A        assert Any.test('bar')%0A%0A    def test_bool(self):%0A        assert Bool(True) is True%0A        assert Bool('y') is True%0A        assert Bool('YES') is True%0A        assert Bool('t') is True%0A        assert Bool('true') is True%0A        assert Bool('1') is True%0A        assert Bool(False) is False%0A        assert Bool('n') is False%0A        assert Bool('NO') is False%0A        assert Bool('f') is False%0A        assert Bool('false') is False%0A        assert Bool('0') is False%0A        assert Bool() is False%0A        assert Bool.test(None) is False%0A        assert Bool(True) is True%0A        assert Bool.test('foo') is False%0A        with self.assertRaises(InvalidTypeError):%0A            Bool('foo')%0A%0A    def test_int(self):%0A        assert Int(1) == 1%0A        assert Int('1') == 1%0A        assert Int() == 0%0A        with self.assertRaises(InvalidTypeError):%0A            Int('foo')%0A        with self.assertRaises(InvalidTypeError):%0A            Int('1.1')%0A%0A    def test_float(self):%0A        assert Float(1.0) == 1.0%0A        assert Float('1') == 1.0%0A        assert Float(1) == 1.0%0A        assert Float() == 0.0%0A        with self.assertRaises(InvalidTypeError):%0A            Float('foo')%0A%0A    def test_string(self):%0A        assert String('foo') == 'foo'%0A        assert String(u'foo') == u'foo'%0A        assert String() == u''%0A        with self.assertRaises(InvalidTypeError):%0A            String(0)%0A%0A    def test_dict(self):%0A        assert Dict(%7B%7D) == %7B%7D%0A        assert Dict(%7B'foo': 'bar'%7D) == %7B'foo': 'bar'%7D%0A        assert Dict('%7Bfoo: bar%7D') == %7B'foo': 'bar'%7D%0A        assert Dict() == %7B%7D%0A        with self.assertRaises(InvalidTypeError):%0A            assert Dict('%5B%5D')%0A        with self.assertRaises(InvalidTypeError):%0A            assert Dict(%5B%5D)%0A        with self.assertRaises(InvalidTypeError):%0A            assert Dict('')%0A        with self.assertRaises(InvalidTypeError):%0A            # malformed yaml/json%0A            assert Dict('%7Bfoo:bar%7D')%0A%0A    def test_sequence(self):%0A        assert Sequence(()) == ()%0A        assert Sequence(%5B%5D) == ()%0A        assert Sequence((1, 2, 3)) == (1, 2, 3)%0A        assert Sequence('%5B1,2,3%5D') == (1, 2, 3)%0A        with self.assertRaises(InvalidTypeError):%0A            Sequence('%7B%7D')%0A        with self.assertRaises(InvalidTypeError):%0A            Sequence(%7B%7D)%0A        with self.assertRaises(InvalidTypeError):%0A            Sequence('')%0A        with self.assertRaises(InvalidTypeError):%0A            # malformed yaml/json%0A            Sequence('%5B1,')%0A

Add test_types.py