Skip to main content
added 343 characters in body
Source Link

Wow, tests are here, that's nice. I guess I would add a newline on the end of the file. You can use a flake8 tool to check other style problems. About python 2 and 3, you definetly should use only 3. Official support for python 2 will end in 2020 and no new features, just bugfixes. Of course it is nice to know python 2 syntax and problems, but development of new things should happen only in python 3. Also you can check out unittest library.

  • I guess I would add a newline on the end of the file as it is W292 in PEP-8. You can use a flake8 tool to check other style problems.

  • About your question about python 2 and 3, you definetly should use only 3. Official support for python 2 will end in 2020 and no new features, just bugfixes. Of course it is nice to know python 2 syntax and problems, but development of new things should happen only in python 3.

  • You are asserting if the Exception was raised in your code, but not the actual error message. You cannot be sure if you are in the correct point in your application. I would implement custom exceptions and try to assert them, as Exception would be anything that inherits from the Exception class, for example ZeroDivision Error.

Wow, tests are here, that's nice. I guess I would add a newline on the end of the file. You can use a flake8 tool to check other style problems. About python 2 and 3, you definetly should use only 3. Official support for python 2 will end in 2020 and no new features, just bugfixes. Of course it is nice to know python 2 syntax and problems, but development of new things should happen only in python 3. Also you can check out unittest library.

Wow, tests are here, that's nice.

  • I guess I would add a newline on the end of the file as it is W292 in PEP-8. You can use a flake8 tool to check other style problems.

  • About your question about python 2 and 3, you definetly should use only 3. Official support for python 2 will end in 2020 and no new features, just bugfixes. Of course it is nice to know python 2 syntax and problems, but development of new things should happen only in python 3.

  • You are asserting if the Exception was raised in your code, but not the actual error message. You cannot be sure if you are in the correct point in your application. I would implement custom exceptions and try to assert them, as Exception would be anything that inherits from the Exception class, for example ZeroDivision Error.

Source Link

Wow, tests are here, that's nice. I guess I would add a newline on the end of the file. You can use a flake8 tool to check other style problems. About python 2 and 3, you definetly should use only 3. Official support for python 2 will end in 2020 and no new features, just bugfixes. Of course it is nice to know python 2 syntax and problems, but development of new things should happen only in python 3. Also you can check out unittest library.