<p>لم يتم التعرف على المكون الإضافي pytest-django بواسطة py.test كمكوِّن إضافي على Ubuntu 14.04</p>

تم إنشاؤها على ١٨ يونيو ٢٠١٤  ·  5تعليقات  ·  مصدر: pytest-dev/pytest-django

وصف قصير

ناتج pip install pytest-django pytest-instafail && py.test no-such-path هو

============================= test session starts ==============================
platform linux2 -- Python 2.7.6 -- py-1.4.20 -- pytest-2.5.2
plugins: instafail
ERROR: file not found: no-such-path

===============================  in 0.01 seconds ===============================

django غير مدرج بين المكونات الإضافية

تم الاختبار مع python 2.7 على Ubuntu Trusty 64 on Vagrant مع pytest_django 2.6.2

لإعادة إنتاج

قم بإنشاء صندوق متشرد

mkdir vagrant-pytest-does-not-recogniz-pytest-django-on-ubuntu-trusty64
cd vagrant-pytest-does-not-recogniz-pytest-django-on-ubuntu-trusty64
vagrant init ubuntu/trusty64
vagrant ssh

قم بتثبيته في حزم الموقع العالمية

(mkdir installing-into-global &&\
cd installing-into-global &&\
(wget http://peak.telecommunity.com/dist/ez_setup.py -O ez_setup.py &&\
sudo python ez_setup.py -U pip && \
sudo pip install pytest-django pytest-instafail && \
python --version &&\
pip freeze && \
which py.test && \
py.test no-such-path) 2>&1 | tee log)

قم بتثبيته في بيئة افتراضية

(mkdir installing-into-venv &&\
cd installing-into-venv &&\
sudo pip install virtualenv &&\
(virtualenv venvpytest --no-site-packages --no-setuptools --no-pip &&\
source venvpytest/bin/activate &&\
wget http://peak.telecommunity.com/dist/ez_setup.py -O ez_setup.py &&\
python ez_setup.py -U pip &&\
pip install pytest-django pytest-instafail &&\
python --version &&\
pip freeze &&\
 py.test no-such-path) 2>&1 | tee log)

يمكن العثور على الإخراج من الأوامر أعلاه على https://gist.github.com/zsoldosp/bdf8c82125df418759fe

bug

التعليق الأكثر فائدة

فقط في حالة مواجهة أي شخص آخر لهذه المشكلة: بالنسبة لي ، كان سببها إصدار قديم من setuptools. بعد الترقية من setuptools 0.6 إلى أحدث إصدار (حاليًا 28.7.1) ، تم اكتشاف المكون الإضافي بشكل صحيح.

ال 5 كومينتر

تم التأكيد ، في حالة عامل ميناء.

ومع ذلك ، يبدو أن هذا تم إصلاحه بشكل رئيسي:

# git clone https://github.com/pelme/pytest_django
# cd pytest_django
# pip install -e .
# cd /tmp
# py.test --version
This is pytest version 2.5.2, imported from /usr/local/lib/python2.7/dist-packages/pytest.pyc
setuptools registered plugins:
  pytest-django-2.6.2 at /pytest_django/pytest_django/plugin.pyc
  pytest-instafail-0.2.0 at /usr/local/lib/python2.7/dist-packages/pytest_instafail.pyc

قد لا يكون مرتبطًا بـ master ، ولكن بسبب اختيار py.test خاطئ - على سبيل المثال لأنك تحتاج إلى استدعاء rehash مع zsh بعد تثبيت py.test - وبخلاف ذلك ، يتم اختيار py.test النظام من الهيكل.
لذا ، تأكد من استدعاء virtualenv/bin/py.test صراحة.

قد لا تكون هذه مشكلة هنا ، ولكن من السهل نسيانها.

أقوم بإغلاق هذا ، وفقًا لتعليقي (تعليقاتي) السابق.

يرجى إعادة الفتح في حالة استمرار المشكلة بالنسبة لك ، ثم يرجى أيضًا تجربتها مع تثبيت pytest-django من Master.

فقط في حالة مواجهة أي شخص آخر لهذه المشكلة: بالنسبة لي ، كان سببها إصدار قديم من setuptools. بعد الترقية من setuptools 0.6 إلى أحدث إصدار (حاليًا 28.7.1) ، تم اكتشاف المكون الإضافي بشكل صحيح.

لقد كنت أعاني من هذه المشكلة أيضًا ، وقد أدى ترقية النقطة وإعادة تثبيت التوزيع إلى حل المشكلة.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات