Skip to content

Instantly share code, notes, and snippets.

(python3.1) vbabiy@ubuntu ~/Projects/git-projects/pip [python3••] ❯❯ python setup.py test
running test
running egg_info
writing pip.egg-info/PKG-INFO
writing top-level names to pip.egg-info/top_level.txt
writing dependency_links to pip.egg-info/dependency_links.txt
writing entry points to pip.egg-info/entry_points.txt
reading manifest file 'pip.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build/_sources'
(python3.1) vbabiy@ubuntu ~/Projects/git-projects/pip [python3•] ❯❯ time nosetests -v -x tests.test_basic
Check we are running proper version of pip in run_pip. ... ERROR
======================================================================
ERROR: Check we are running proper version of pip in run_pip.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/vbabiy/.virtualenvs/python3.1/lib/python3.1/site-packages/nose/case.py", line 188, in runTest
self.test(*self.arg)
File "/mnt/hgfs/mac_home/Projects/git-projects/pip/tests/test_basic.py", line 20, in test_correct_pip_version
(python3.2) vbabiy@ubuntu ~/Projects/git-projects/pip [python3•] ❯❯ time nosetests -v -x tests.test_basic
Check we are running proper version of pip in run_pip. ... ok
Check if ``pip-<PYVERSION>`` commands behaves equally ... ok
Test installing a package from PyPI. ... ok
Test installing a package from the PyPI mirrors. ... ok
Test installing a package from a specific PyPI mirror. ... ok
Test editable installation. ... ok
Test checking out from svn. ... ok
Test downloading an editable using a relative custom src folder. ... ok
Test installing an editable in two steps (first with --no-install, then with --no-download). ... ok
import unittest
from chai import Chai
class Walrus(object):
def __init__(self):
self.energy = 0
def receive_gift(self, gift):
if gift.is_editable():
@vbabiy
vbabiy / gist:4519573
Last active December 11, 2015 00:49
Get Location
navigator.geolocation.getCurrentPosition(function(args) {
console.log(args.coords.latitude,args.coords.longitude)
}, function(error) {
console.error(error);
});
@vbabiy
vbabiy / Test
Created April 5, 2013 15:03
Test
print "Hello World"
@vbabiy
vbabiy / parsers.py
Last active March 29, 2020 22:36
CamelCaseJSONRenderer For django rest framework
from rest_framework.parsers import JSONParser
from django.conf import settings
import re
import json
first_cap_re = re.compile('(.)([A-Z][a-z]+)')
all_cap_re = re.compile('([a-z0-9])([A-Z])')
def camel_to_underscore(name):
s1 = first_cap_re.sub(r'\1_\2', name)
@vbabiy
vbabiy / became.py
Created July 24, 2013 22:48
Working extract method
class TestHome(TestCase):
def test_home_template_used(self):
res = self.get_name()
self.assertTemplateUsed(res, 'home.html')
def get_name(self):
res = self.client.get('/')
return res
def test_home_template_contains_hello_world(self):
@vbabiy
vbabiy / after.py
Last active December 20, 2015 04:59
class TestHome(TestCase):
def get_home(self):
return self.client.get('/')
def test_home_template_used(self):
self.assertTemplateUsed(self.get_home(), 'home.html')
def test_home_template_contains_hello_world(self):
self.assertContains(self.client.get('/'), 'Hello World')
@vbabiy
vbabiy / node.yaml
Last active December 22, 2015 17:09
nodejs:
pkg.installed:
- pkgs:
- nodejs: '0.10.18-1chl1~precise1'
- npm