Skip to content

Instantly share code, notes, and snippets.

$ tox -r -- -k test_4_Auto
python recreate: /Users/jaraco/Dropbox/code/public/cherrypy/.tox/python
python develop-inst: /Users/jaraco/Dropbox/code/public/cherrypy
python installed: attrs==17.4.0,backports.unittest-mock==1.3,certifi==2018.1.18,chardet==3.0.4,cheroot==6.0.0,-e git+gh://cherrypy/cherrypy@816378ebbbcb775379293dd30c9da0bcef02e156#egg=CherryPy,codecov==2.0.15,coverage==4.5.1,graphviz==0.8.2,idna==2.6,more-itertools==4.1.0,objgraph==3.4.0,path.py==11.0,pluggy==0.6.0,portend==2.2,py==1.5.2,pytest==3.4.0,pytest-cov==2.5.1,pytest-sugar==0.9.1,pytz==2018.3,repoze.lru==0.7,requests==2.18.4,Routes==2.4.1,six==1.11.0,tempora==1.10,termcolor==1.1.0,urllib3==1.22
python runtests: PYTHONHASHSEED='3944111983'
python runtests: commands[0] | pytest -k test_4_Auto
Test session starts (platform: darwin, Python 3.7.0, pytest 3.4.0, pytest-sugar 0.9.1)
cachedir: .pytest_cache
rootdir: /Users/jaraco/Dropbox/code/public/cherrypy, inifile: pytest.ini
plugins: sugar-0.9.1, cov-2.5.1, backports.unittest-mo
$ ~/p/pytest/.tox/python/bin/pytest -p no:capturemanager
====================================== test session starts =======================================
platform darwin -- Python 3.6.4, pytest-3.4.1.dev34+gce1872e7.d20180213, py-1.5.2, pluggy-0.6.0
rootdir: /Users/jaraco/Dropbox/code/public/pytest, inifile: tox.ini
plugins: hypothesis-3.44.26
collected 1 item
test_stuff.py
>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--Return--
$ cat > test_stuff.py
">>> 3\n3"
def test_stuff():
import pdb; pdb.set_trace()
$ ~/p/pytest/.tox/python/bin/pytest --capture=no
====================================== test session starts =======================================
platform darwin -- Python 3.6.4, pytest-3.4.1.dev34+gce1872e7.d20180213, py-1.5.2, pluggy-0.6.0
rootdir: /Users/jaraco/Dropbox/code/public/pytest, inifile: tox.ini
plugins: hypothesis-3.44.26
def is_docker():
path = f'/proc/{os.getpid()}/cgroup'
pattern = re.compile(r'\d+:\w+:/docker/\w+')
return os.path.isfile(path) and any(map(pattern.match, open(path)))
$ git diff
diff --git a/tox.ini b/tox.ini
index e3e9110b..f55fd493 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,6 @@
[tox]
envlist = python
+minversion = 2.4
PS C:\Users\jaraco\m\jaraco.office> py -3.4 .\build-exe.py
running py2exe
3 missing Modules
------------------
? jaraco.classes imported from __SCRIPT__
? packaging imported from pkg_resources
? readline imported from cmd, code, pdb
Building 'dist\server.exe'.
Building shared code archive 'dist\library.zip'.
"""
Build script to create a doc-to-pdf convert server as a Windows executable.
"""
import os
setup_params = dict(
console=['server.py'],
options=dict(
PS C:\Users\jaraco\m\jaraco.office> py -3.4 .\build-exe.py
running py2exe
Traceback (most recent call last):
File ".\build-exe.py", line 21, in <module>
setup(**setup_params)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
"""
Build script to create a doc-to-pdf convert server as a Windows executable.
"""
import os
setup_params = dict(
console=['server.py'],
script_args=('py2exe',),
@jaraco
jaraco / a.rb
Created December 31, 2017 18:38
PS C:\users\jaraco> cmd /c mklink /d bar foo
symbolic link created for bar <<===>> foo
PS C:\users\jaraco> mkdir foo
Directory: C:\users\jaraco
Mode LastWriteTime Length Name
---- ------------- ------ ----