CleanCut / green

Green is a clean, colorful, fast python test runner.
MIT License
792 stars 75 forks source link

Error in green.runner.N/A.poolRunner #70

Closed MinchinWeb closed 9 years ago

MinchinWeb commented 9 years ago

Firstly, thanks for creating this project. I quite enjoy being able to add a little bit of colour to the command line!

Something changed in green between version 1.9.4 and 1.10.0. Before all my tests ran as expected. Output from v1.9.4:

test_colour
  Test_Colour
.   test_3hex_colour
.   test_6hex_colour
.   test_colour_bad_Tuple_value
.   test_colour_bad_hex_chars
.   test_colour_bad_hex_string_length
.   test_colour_bad_list_legnth
.   test_colour_bad_list_value
.   test_colour_bad_tuple_legnth
.   test_colour_blue
.   test_colour_green
.   test_colour_hex
.   test_colour_hex_black
.   test_colour_list
.   test_colour_not_hex_string
.   test_colour_red
.   test_colour_repr
.   test_colour_rgb
.   test_colour_rgb_nomralized_black
.   test_colour_rgb_normalized_white
.   test_colour_str
.   test_colour_tuple
x   test_colour_vs_color
.   test_default_colour
  Test_Contrast
.   test_contrast_black_black
.   test_contrast_from_colour
.   test_contrast_white_black
.   test_contrast_white_white
  Test_Luminance
.   test_luminance_as_colour_property
.   test_luminance_black
.   test_luminance_colour_provided
.   test_luminance_white_hex
.   test_luminance_white_tuple
test_palette
  Test_Palette
.   test_palette_length
.   test_palette_repr
.   test_palette_str
test_setup
  Test_Setup
.   test_version
.   test_we_live

Ran 37 tests in 0.009s

OK (expected_failures=1, passes=36)

However, with v1.10.0, none of the tests pass, and it seems to be an issue with green. Here is the output:

test_colour
  Test_Colour
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
  Test_Contrast
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
  Test_Luminance
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
E   poolRunner
test_palette
  Test_Palette
E   poolRunner
E   poolRunner
E   poolRunner
test_setup
  Test_Setup
E   poolRunner
E   poolRunner

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Error in green.runner.N/A.poolRunner
  File "C:\Python34\lib\site-packages\green\subprocess.py", line 236, in poolRunner
    test.run(result)
AttributeError: 'NoneType' object has no attribute 'run'

Ran 37 tests in 0.420s

FAILED (errors=37)

I'm running Python 3.4.2 on Windows 7. The tests are from colourettu.

CleanCut commented 9 years ago

Oh my. That's quite a regression. What command-line options or config file settings are you using?

MinchinWeb commented 9 years ago

I'm running green tests -vv. I don't think I have configuration file setup.

CleanCut commented 9 years ago

This is fixed in the simplify-subprocesses branch. It will be released as part of 2.0, hopefully this week. I see you have been busy writing tests! Here is what the tests look like with the current code I'm working on:

test_colour
  Test_Colour
.   test_3hex_colour
.   test_6hex_colour
.   test_bad_Tuple_value
.   test_bad_hex_chars
.   test_bad_hex_string_length
.   test_bad_list_legnth
.   test_bad_list_value
.   test_bad_tuple_legnth
.   test_blue
x   test_colour_vs_color
.   test_default_colour
.   test_eq
.   test_green
.   test_hex
.   test_hex_black
.   test_list
.   test_list_normalized_rgb
.   test_list_normalized_rgb_value_too_big
.   test_list_normalized_rgb_value_too_small
s   test_list_not_normalized -- Not yet defined
.   test_normalized_value_one_float
.   test_normalized_value_one_int
.   test_normalized_value_zero_float
.   test_normalized_value_zero_int
.   test_not_hex_string
.   test_red
.   test_repr
.   test_rgb
.   test_rgb_nomralized_black
.   test_rgb_normalized_white
.   test_str
.   test_tuple
s   test_tuple_for_normalized_rgb_too_long -- Not yet defined
s   test_tuple_for_normalized_rgb_too_short -- Not yet defined
.   test_tuple_normalized_rgb
.   test_tuple_normalized_rgb_value_too_big
.   test_tuple_normalized_rgb_value_too_small
.   test_tuple_not_normalized
  Test_Contrast
.   test_black_black
.   test_from_colour
.   test_white_black
.   test_white_white
  Test_Luminance
.   test_as_colour_property
.   test_black
.   test_colour_provided
.   test_white_hex
.   test_white_tuple
test_palette
  Test_Palette
.   test_colour_plus_palette
.   test_convert_end_colour
.   test_convert_start_colour
.   test_from_list_convert_list_colour
.   test_from_list_list
.   test_from_list_tuple
.   test_invalid_end_colour
.   test_invalid_start_colour
.   test_length
.   test_palette_plus_colour
F   test_palette_plus_palette
E   test_palette_plus_palette_overlapping_colour
.   test_repr
.   test_str
  Test_Palette_with_Images
.   test_to_image
s   test_to_image_alpha_channel -- not yet defined
s   test_to_image_band_width -- not yet defined
s   test_to_image_max_width -- not yet defined
test_setup
  Test_Setup
.   test_version
.   test_we_live

Skipped test_colour.Test_Colour.test_list_not_normalized - Not yet defined

Skipped test_colour.Test_Colour.test_tuple_for_normalized_rgb_too_long - Not yet defined

Skipped test_colour.Test_Colour.test_tuple_for_normalized_rgb_too_short - Not yet defined

Skipped test_palette.Test_Palette_with_Images.test_to_image_alpha_channel - not yet defined

Skipped test_palette.Test_Palette_with_Images.test_to_image_band_width - not yet defined

Skipped test_palette.Test_Palette_with_Images.test_to_image_max_width - not yet defined

Failure in test_palette.Test_Palette.test_palette_plus_palette
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/Users/nathan/proj/green/colourettu/test/test_palette.py", line 86, in test_palette_plus_palette
    self.assertEqual(len(p3), 4)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 508, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 3 != 4

Error in test_palette.Test_Palette.test_palette_plus_palette_overlapping_colour
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/Users/nathan/proj/green/colourettu/test/test_palette.py", line 96, in test_palette_plus_palette_overlapping_colour
    self.assertEqual(p3._end, colourettu.colour('#789'))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 505, in _baseAssertEqual
    if not first == second:
  File "colourettu/_colour.py", line 122, in __eq__
    return (self._r is other._r) and (self._g is other._g) and (self._b is other._b)
AttributeError: palette instance has no attribute '_r'

Ran 67 tests in 0.114s

FAILED (errors=1, expected_failures=1, failures=1, passes=58, skips=6)
CleanCut commented 9 years ago

2.0.0 is imminent. Tomorrow, I hope. Or Monday.

MinchinWeb commented 9 years ago

:+1: Looks great! Thanks for quick fix.

As for those last two failing tests of my own, their a little annoying as they work on Python 3.4, but not 2.7... but I'll figure them out eventually!

CleanCut commented 9 years ago

2.0.0 has been released!!!

MinchinWeb commented 9 years ago

Somethings is still broken :( see #74