Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing test: features/step_param.builtin_types.with_integer.feature #862

Closed
siriobalmelli opened this issue Sep 8, 2020 · 4 comments
Closed

Comments

@siriobalmelli
Copy link

Fails with the following message:

+   Scenario Outline: Conversion from other number system (base=2, 8, 16) -- @1.1 
+     Given a integer param with "0b1011" ... passed
+     Then the value should be matched as integer number with "11" ... failed
+ Assertion Failed: FAILED: value(1011) == expected(11)
+ 
+   Scenario Outline: Conversion from other number system (base=2, 8, 16) -- @1.2 
+     Given a integer param with "0o123" ... passed
+     Then the value should be matched as integer number with "83" ... failed
+ Assertion Failed: FAILED: value(123) == expected(83)
+ 
+   Scenario Outline: Conversion from other number system (base=2, 8, 16) -- @1.3 
+     Given a integer param with "0xBEEF" ... passed
+     Then the value should be matched as integer number with "48879" ... failed
+ Assertion Failed: FAILED: value(0) == expected(48879)
+ 
+ 
+ Failing scenarios:
+   features/example.int_param.with_type_d.feature:34  Conversion from other number system (base=2, 8, 16) -- @1.1 
+   features/example.int_param.with_type_d.feature:35  Conversion from other number system (base=2, 8, 16) -- @1.2 
+   features/example.int_param.with_type_d.feature:36  Conversion from other number system (base=2, 8, 16) -- @1.3 
+ 
+ 0 features passed, 1 failed, 0 skipped
- 12 scenarios passed, 0 failed, 0 skipped
? ^^                   ^

+ 9 scenarios passed, 3 failed, 0 skipped
? ^                   ^

+ 21 steps passed, 3 failed, 0 skipped, 0 undefined
+ Took 0m0.003s
--------------------------------------------------------------------------------


Failing scenarios:
  features/step_param.builtin_types.with_integer.feature:94  Use type "d" (Digits) for integer params

72 features passed, 1 failed, 0 skipped, 9 untested
439 scenarios passed, 1 failed, 3 skipped, 58 untested
1785 steps passed, 1 failed, 15 skipped, 0 undefined, 229 untested

To reproduce on a vanilla Ubuntu 18.04 AWS instance:

sudo apt update
sudo apt install python3 python3-venv
git clone https://github.com/behave/behave.git
cd behave
python3 -m venv venv
source venv/bin/activate
python3 -m pip install wheel
python3 -m pip install -r py.requirements/all.txt
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
pytest tests
python3 bin/behave -f progress3 --stop features/
@siriobalmelli
Copy link
Author

For the record, this also fails on python 3.7 and 3.8, I used Nix for those:

Contents of shell.nix:

with import <nixpkgs>{};

mkShell {
  buildInputs = with python37Packages; [
    python
    venvShellHook
  ];

  venvDir = "venv";

  postShellHook = ''
    export SOURCE_DATE_EPOCH=315532800  # fix ZIP does not support timestamps before 1980
    alias pip="python -m pip"
  '';
}

contents of runtests.sh:

set -e
pip install -r py.requirements/all.txt
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
pytest tests
python bin/behave -f progress3 --stop features/
python bin/behave -f progress3 --stop tools/test-features/
python bin/behave -f progress3 --stop issue.features/
echo "ok"

Then to test:

nix-shell --command ./runtests.sh

@maxxk
Copy link

maxxk commented Sep 9, 2020

It works with parse == 1.15.0, but doesn't with parse == 1.16.0.
I think it this commit is relevant: r1chardj0n3s/parse@5b95087

@jenisys
Copy link
Member

jenisys commented Sep 10, 2020

See parse issue #121 (and pull-request #122 that fixes the problem).

OOPS, just saw that @maxxk already solved the same problem (in the same way).

@jenisys
Copy link
Member

jenisys commented Sep 11, 2020

FIXED WITH: parse v1.18.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants