Building Testcases | Batch Running and Skipping Tests

Building Testcases | Batch Running and Skipping Tests 25 min

  

Building first test case, Running the test from IDE, Running test case from command, Prompt Making multiple test cases, Running test cases in batch from command, Prompt Skipping Test cases

QA Section

Speak Your Mind


Ahmed Faraz

I'm getting this error: C:\python39\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.3\plugins\python-ce\helpers\pycharm\_jb_pytest_runner.py" --path C:/Users/18326/PycharmProjects/MyFirstProject/testcases/test_demo.py Testing started at 12:56 PM ... Traceback (most recent call last): 2021-05-18 12:56:58.488841 File "C:\Program Files\JetBrains\PyCharm Community Edition 2020.3.3\plugins\python-ce\helpers\pycharm\_jb_pytest_runner.py", line 4, in import pytest 18-May-2021 File "C:\python39\lib\site-packages\pytest\__init__.py", line 22, in from _pytest.logging import LogCaptureFixture File "C:\python39\lib\site-packages\_pytest\logging.py", line 35, in from _pytest.terminal import TerminalReporter File "C:\python39\lib\site-packages\_pytest\terminal.py", line 6, in import datetime File "C:\Users\18326\PycharmProjects\MyFirstProject\datetime.py", line 12, in string_formattedDate = datetime.strptime(date, "%d/%m/%Y") File "C:\python39\Lib\_strptime.py", line 15, in import calendar File "C:\python39\Lib\calendar.py", line 50, in class _localized_month: File "C:\python39\Lib\calendar.py", line 52, in _localized_month _months = [datetime.date(2001, i+1, 1).strftime for i in range(12)] File "C:\python39\Lib\calendar.py", line 52, in _months = [datetime.date(2001, i+1, 1).strftime for i in range(12)] TypeError: 'str' object is not callable Process finished with exit code 1 Empty suite

Reply
  • Ahmed Faraz

    As I was following the lecture, I installed pytest and setup as required. I ran the test and got the above error, please let me know how to get rid of this. I'm stuck on this.

    Reply