diff options
| author | 2018-07-29 20:55:36 +0200 | |
|---|---|---|
| committer | 2018-07-29 20:55:36 +0200 | |
| commit | e5668324118ce77c4b144fc3ae164a634effa1f6 (patch) | |
| tree | d981238ccd914cd981e48d1e7e3793c1890a45b4 /tests | |
| parent | tag with pythondiscord (diff) | |
upgrade alpine to 3.8 and python to 3.6.6, remove old tests also cache pipenv
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_snekbox.py | 22 | 
1 files changed, 7 insertions, 15 deletions
| diff --git a/tests/test_snekbox.py b/tests/test_snekbox.py index 0a05881..e2505d6 100644 --- a/tests/test_snekbox.py +++ b/tests/test_snekbox.py @@ -50,19 +50,11 @@ class SnekTests(unittest.TestCase):          result = snek.python3(code)          self.assertIn('Resource temporarily unavailable', result.strip()) -    # def test_juan_golf(self):  # in honour of Juan -    #     code = ("exec(type((lambda:0).code)(0,1,0,0,0,b'\x09\x00',(),(),(),'','',1,b''))") -    #     result = snek.python3(code) -    #     self.assertEquals('ValueError: embedded null byte', result.strip()) - -#class RMQTests(unittest.TestCase): -#    @pytest.mark.dependency() -#    def test_a_publish(self): -#        message = json.dumps({"snekid": "test", "message": "print('test')"}) -#        result = r.publish(message, queue='input') -#        self.assertTrue(result) +    def test_juan_golf(self):  # in honour of Juan +        code = ("func = lambda: None\n" +                "CodeType = type(func.__code__)\n" +                "bytecode = CodeType(0,1,0,0,0,b'',(),(),(),'','',1,b'')\n" +                "exec(bytecode)") -    # @pytest.mark.dependency(depends=["RMQTests::test_a_publish"]) -    # def test_b_consume(self): -    #     result = r.consume(callback=snek.message_handler, queue='input', run_once=True) -    #     self.assertEquals(result[2], b'{"snekid": "test", "message": "print(\'test\')"}') +        result = snek.python3(code) +        self.assertEquals('unknown error, code: 111', result.strip()) | 
