Commit 8cf54fa83d4846a2d16523d7c441bbe7aeac2676
1 parent
e91ed50c
Import robot_tests.broker.* using sys.path
`Import Library` and `Import Resource` support searching in sys.path, so we don't need to keep a hard-coded relative path for `external_st` anymore. We still need to keep it for `bundled_st` though.
Showing
2 changed files
with
23 additions
and
2 deletions
... | ... | @@ -15,6 +15,14 @@ eggs = |
15 | 15 | openprocurement_client |
16 | 16 | robotframework-lint |
17 | 17 | robotframework-debuglibrary |
18 | + robot_tests.broker.dzo | |
19 | + robot_tests.broker.etender | |
20 | + robot_tests.broker.newtend | |
21 | + robot_tests.broker.privatmarket | |
22 | + robot_tests.broker.prom | |
23 | + robot_tests.broker.publicbid | |
24 | + robot_tests.broker.publicportal | |
25 | + robot_tests.broker.smarttender | |
18 | 26 | |
19 | 27 | interpreter = python_interpreter |
20 | 28 | # The following piece of code changes the default output format of Munch | ... | ... |
... | ... | @@ -145,7 +145,6 @@ Get Broker Property By Username |
145 | 145 | [Return] ${claim} |
146 | 146 | |
147 | 147 | |
148 | - | |
149 | 148 | Підготовка даних для подання скарги |
150 | 149 | [Arguments] ${lot}=${False} |
151 | 150 | ${complaint}= test_complaint_data ${lot} |
... | ... | @@ -187,8 +186,22 @@ Get Broker Property By Username |
187 | 186 | |
188 | 187 | |
189 | 188 | Завантажуємо бібліотеку з реалізацією для майданчика ${keywords_file} |
189 | + [Documentation] | |
190 | + ... Load broker's driver (keyword library). | |
191 | + ... | |
192 | + ... `Import Resource` is called twice: | |
193 | + ... | |
194 | + ... 1) It tries to read from ``brokers/`` directory | |
195 | + ... (located next to ``keywords.robot``). | |
196 | + ... This is an old feature which will be removed in the future. | |
197 | + ... | |
198 | + ... 2) It looks for a given filename in ``sys.path`` | |
199 | + ... (``PYTHONPATH`` environment variable). | |
200 | + ... | |
201 | + ... This keyword will fail if ``keywords_file`` was found | |
202 | + ... in both locations. | |
190 | 203 | ${bundled_st}= Run Keyword And Return Status Import Resource ${CURDIR}${/}brokers${/}${keywords_file}.robot |
191 | - ${external_st}= Run Keyword And Return Status Import Resource ${CURDIR}${/}..${/}..${/}src${/}robot_tests.broker.${keywords_file}${/}${keywords_file}.robot | |
204 | + ${external_st}= Run Keyword And Return Status Import Resource ${keywords_file}.robot | |
192 | 205 | Run Keyword If ${bundled_st} == ${external_st} == ${False} Fail Resource file ${keywords_file}.robot not found |
193 | 206 | Run Keyword If ${bundled_st} == ${external_st} == ${True} Fail Resource file ${keywords_file}.robot found in both brokers${/} and src${/} |
194 | 207 | ... | ... |
Please
register
or
login
to post a comment