| 1 |
@issue |
| 2 |
Feature: Issue #309 -- behave --lang-list fails on Python3 |
| 3 |
|
| 4 |
. When I type "behave --lang-list", the following error occurs on Python 3.4: |
| 5 |
. |
| 6 |
. Traceback (most recent call last): |
| 7 |
. File "/usr/local/bin/behave", line 11, in <module> |
| 8 |
. sys.exit(main()) |
| 9 |
. File "/usr/local/lib/python3.4/dist-packages/behave/__main__.py", line 65, in main |
| 10 |
. iso_codes.sort() |
| 11 |
. AttributeError: 'dict_keys' object has no attribute 'sort' |
| 12 |
. |
| 13 |
. ADDITIONAL PROBLEM: On Python2 you may get an UnicodeDecodeError |
| 14 |
. Traceback (most recent call last): |
| 15 |
. ... |
| 16 |
. Languages available: |
| 17 |
. File "/Users/jens/se/behave_main.fix/behave/__main__.py", line 70, in main |
| 18 |
. print(u'%s: %s / %s' % (iso_code, native, name)) |
| 19 |
. UnicodeEncodeError: 'ascii' codec can't encode characters in position 4-10: ordinal not in range(128) |
| 20 |
. |
| 21 |
. RELATED FEATURES: |
| 22 |
. * features/cmdline.lang_list.feature |
| 23 |
. |
| 24 |
|
| 25 |
|
| 26 |
@problematic |
| 27 |
@not.with_os=win32 |
| 28 |
Scenario: Use behave --lang-list |
| 29 |
When I run "behave --lang-list" |
| 30 |
Then it should pass with: |
| 31 |
""" |
| 32 |
Languages available: |
| 33 |
ar: العربية / Arabic |
| 34 |
bg: български / Bulgarian |
| 35 |
ca: català / Catalan |
| 36 |
cs: Česky / Czech |
| 37 |
cy-GB: Cymraeg / Welsh |
| 38 |
da: dansk / Danish |
| 39 |
de: Deutsch / German |
| 40 |
en: English / English |
| 41 |
""" |
| 42 |
And the command output should contain: |
| 43 |
""" |
| 44 |
sv: Svenska / Swedish |
| 45 |
tr: Türkçe / Turkish |
| 46 |
uk: Українська / Ukrainian |
| 47 |
uz: Узбекча / Uzbek |
| 48 |
vi: Tiếng Việt / Vietnamese |
| 49 |
zh-CN: 简体中文 / Chinese simplified |
| 50 |
zh-TW: 繁體中文 / Chinese traditional |
| 51 |
""" |
| 52 |
But the command output should not contain "Traceback" |