Skip to content

Commit

Permalink
WIP fix: bump argo submodule, fix unknown ID errors for RPC server
Browse files Browse the repository at this point in the history
TODO: push argo to PyPI once that's finalized, bump cryptol to use that.
  • Loading branch information
Andrew Kent committed Aug 30, 2021
1 parent 0eea2cb commit cfd90fb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
4 changes: 0 additions & 4 deletions cryptol-remote-api/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ used. Below is a brief summary:

Additional arguments and options are documented with the function.

Notably, the `reset_server` keyword can be used to connect to a running server
and reset it, ensuring states from previous scripts have been cleared. E.g.,
`cryptol.connect(reset_server=True)`.


## Acquiring a Cryptol Server

Expand Down
16 changes: 9 additions & 7 deletions cryptol-remote-api/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion cryptol-remote-api/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ include = [
python = ">=3.7.0"
requests = "^2.25.1"
BitVector = "^3.4.9"
argo-client = "0.0.7"
#argo-client = "0.0.8"
argo-client = { path = "../../deps/argo/python/", develop = true }

[tool.poetry.dev-dependencies]
mypy = "^0.812"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestCplxQ(unittest.TestCase):
def test_CplxQ(self):
c = cryptol.connect(reset_server=True, verify=False)
c = cryptol.connect(verify=False)
c.load_file(str(Path('tests','cryptol','test-files', 'CplxQNewtype.cry')))

forty_two = c.eval("fortyTwo").result()
Expand Down
4 changes: 2 additions & 2 deletions cryptol-remote-api/python/tests/cryptol_eval/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ def test_reset_with_many_usages_many_connections(self):
self.assertEqual(res, [BV(size=8,value=0xff), BV(size=8,value=0xff)])
c.reset()

def test_reset_server_with_many_usages_many_connections(self):
def test_server_with_many_usages_many_connections(self):
for i in range(0,100):
time.sleep(.05)
c = cryptol.connect(url=self.url, reset_server=True)
c = cryptol.connect(url=self.url)
res = c.call('f', BV(size=8,value=0xff)).result()
self.assertEqual(res, [BV(size=8,value=0xff), BV(size=8,value=0xff)])

Expand Down

0 comments on commit cfd90fb

Please sign in to comment.