diff options
author | Aaron Andersen <aaron@fosslib.net> | 2019-02-22 14:17:30 -0500 |
---|---|---|
committer | Aaron Andersen <aaron@fosslib.net> | 2019-02-22 15:00:20 -0500 |
commit | c5ddcfe69f31b8c494c232a747167cd81d09c31b (patch) | |
tree | 30c6815753806a62bcd219255ed999432407102d /nixos/tests/beanstalkd.nix | |
parent | 3a1f39e1de3d003782cc40c13c29ccc73e23f550 (diff) |
nixos/beanstalkd: update test to use python3 instead of python2
Diffstat (limited to 'nixos/tests/beanstalkd.nix')
-rw-r--r-- | nixos/tests/beanstalkd.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nixos/tests/beanstalkd.nix b/nixos/tests/beanstalkd.nix index 9b7ac111a57..fa2fbc2c92a 100644 --- a/nixos/tests/beanstalkd.nix +++ b/nixos/tests/beanstalkd.nix @@ -1,23 +1,25 @@ import ./make-test.nix ({ pkgs, lib, ... }: let + pythonEnv = pkgs.python3.withPackages (p: [p.beanstalkc]); + produce = pkgs.writeScript "produce.py" '' - #!${pkgs.python2.withPackages (p: [p.beanstalkc])}/bin/python + #!${pythonEnv.interpreter} import beanstalkc queue = beanstalkc.Connection(host='localhost', port=11300, parse_yaml=False); - queue.put('this is a job') - queue.put('this is another job') + queue.put(b'this is a job') + queue.put(b'this is another job') ''; consume = pkgs.writeScript "consume.py" '' - #!${pkgs.python2.withPackages (p: [p.beanstalkc])}/bin/python + #!${pythonEnv.interpreter} import beanstalkc queue = beanstalkc.Connection(host='localhost', port=11300, parse_yaml=False); job = queue.reserve(timeout=0) - print job.body + print(job.body.decode('utf-8')) job.delete() ''; |