معرفی شرکت ها


expecttest-0.1.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

-
ویژگی مقدار
سیستم عامل -
نام فایل expecttest-0.1.4
نام expecttest
نسخه کتابخانه 0.1.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Edward Z. Yang
ایمیل نویسنده ezyang@mit.edu
آدرس صفحه اصلی https://github.com/ezyang/expecttest
آدرس اینترنتی https://pypi.org/project/expecttest/
مجوز MIT
# expecttest [![PyPI version](https://badge.fury.io/py/expecttest.svg)](https://badge.fury.io/py/expecttest) This library implements expect tests (also known as "golden" tests). Expect tests are a method of writing tests where instead of hard-coding the expected output of a test, you run the test to get the output, and the test framework automatically populates the expected output. If the output of the test changes, you can rerun the test with the environment variable `EXPECTTEST_ACCEPT=1` to automatically update the expected output. Somewhat unusually, this library implements *inline* expect tests: that is to say, the expected output isn't saved to an external file, it is saved directly in the Python file (and we modify your Python file when updating the expect test.) The general recipe for how to use this is as follows: 1. Write your test and use `assertExpectedInline()` instead of a normal `assertEqual`. Leave the expected argument blank with an empty string: ```py self.assertExpectedInline(some_func(), "") ``` 2. Run your test. It should fail, and you get an error message about accepting the output with `EXPECTTEST_ACCEPT=1` 3. Rerun the test with `EXPECTTEST_ACCEPT=1`. Now the previously blank string literal will contain the expected value of the test. ```py self.assertExpectedInline(some_func(), "my_value") ``` Some tips and tricks: - Often, you will want to expect test on a multiline string. This framework understands triple-quoted strings, so you can just write `"""my_value"""` and it will turn into triple-quoted strings. - Take some time thinking about how exactly you want to design the output format of the expect test. It is often profitable to design an output representation specifically for expect tests.


زبان مورد نیاز

مقدار نام
>=3.6,<4.0 Python


نحوه نصب


نصب پکیج whl expecttest-0.1.4:

    pip install expecttest-0.1.4.whl


نصب پکیج tar.gz expecttest-0.1.4:

    pip install expecttest-0.1.4.tar.gz