Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
package_control_channel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
package_control_channel
Commits
f4d7bc05
Commit
f4d7bc05
authored
Feb 13, 2015
by
WuHuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1 from wbond/master
merge
parents
90d0ba44
8776094e
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
386 additions
and
102 deletions
+386
-102
0-9.json
repository/0-9.json
+1
-1
a.json
repository/a.json
+13
-2
b.json
repository/b.json
+2
-2
c.json
repository/c.json
+31
-0
d.json
repository/d.json
+10
-0
dependencies.json
repository/dependencies.json
+56
-0
e.json
repository/e.json
+3
-3
f.json
repository/f.json
+27
-6
g.json
repository/g.json
+19
-0
h.json
repository/h.json
+2
-2
i.json
repository/i.json
+10
-0
j.json
repository/j.json
+11
-0
m.json
repository/m.json
+11
-0
n.json
repository/n.json
+11
-0
o.json
repository/o.json
+11
-0
p.json
repository/p.json
+4
-3
q.json
repository/q.json
+11
-1
r.json
repository/r.json
+3
-3
s.json
repository/s.json
+28
-17
t.json
repository/t.json
+48
-5
y.json
repository/y.json
+10
-0
test.py
tests/test.py
+1
-0
unittest_compat.py
tests/unittest_compat.py
+63
-57
No files found.
repository/0-9.json
View file @
f4d7bc05
...
...
@@ -69,7 +69,7 @@
{
"name"
:
"6to5"
,
"details"
:
"https://github.com/6to5/6to5-sublime"
,
"labels"
:
[
"language syntax"
,
"snippets"
],
"labels"
:
[
"language syntax"
,
"snippets"
,
"javascript"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
...
...
repository/a.json
View file @
f4d7bc05
...
...
@@ -556,6 +556,17 @@
}
]
},
{
"name"
:
"ANSIescape"
,
"details"
:
"https://github.com/aziz/SublimeANSI"
,
"labels"
:
[
"language syntax"
],
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"tags"
:
true
}
]
},
{
"name"
:
"Ant"
,
"details"
:
"https://github.com/xeno-by/sublime-ant"
,
...
...
@@ -783,11 +794,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/b.json
View file @
f4d7bc05
...
...
@@ -700,11 +700,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/c.json
View file @
f4d7bc05
...
...
@@ -76,6 +76,17 @@
}
]
},
{
"name"
:
"C++YouCompleteMe"
,
"details"
:
"https://github.com/glymehrvrd/CppYCM"
,
"labels"
:
[
"c++"
,
"code completion"
,
"syntax check"
],
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"tags"
:
true
}
]
},
{
"name"
:
"C0"
,
"details"
:
"https://github.com/mahmoudalismail/SublimeC0"
,
...
...
@@ -331,6 +342,16 @@
}
]
},
{
"name"
:
"CFG Configuration Syntax Highlighting"
,
"details"
:
"https://github.com/aronj/CFGGameConfigurationSyntax"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"cFos ml syntax"
,
"details"
:
"https://github.com/ArmorDarks/cfos-ml-syntax"
,
...
...
@@ -1931,6 +1952,16 @@
}
]
},
{
"name"
:
"Cortex"
,
"details"
:
"https://github.com/Seldomberry/CortexIDE"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Cotonti"
,
"details"
:
"https://github.com/Cotonti/sublime-cotonti"
,
...
...
repository/d.json
View file @
f4d7bc05
...
...
@@ -527,6 +527,16 @@
}
]
},
{
"name"
:
"Django Starter"
,
"details"
:
"https://github.com/geekpradd/Sublime-Django-Starter"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Django-DocsSearch"
,
"details"
:
"https://github.com/saippuakauppias/sublime-text-2-Django-DocsSearch"
,
...
...
repository/dependencies.json
View file @
f4d7bc05
...
...
@@ -16,6 +16,62 @@
}
]
},
{
"name"
:
"ordereddict"
,
"load_order"
:
"50"
,
"description"
:
"Python ordereddict module"
,
"author"
:
"FichteFoll"
,
"issues"
:
"https://github.com/packagecontrol/ordereddict/issues"
,
"releases"
:
[
{
"base"
:
"https://github.com/packagecontrol/ordereddict"
,
"tags"
:
true
,
"sublime_text"
:
"<3000"
}
]
},
{
"name"
:
"pytz"
,
"load_order"
:
"50"
,
"description"
:
"Python pytz module"
,
"author"
:
"FichteFoll"
,
"issues"
:
"https://github.com/packagecontrol/pytz/issues"
,
"releases"
:
[
{
"base"
:
"https://github.com/packagecontrol/pytz"
,
"tags"
:
true
,
"sublime_text"
:
"*"
}
]
},
{
"name"
:
"pyyaml"
,
"load_order"
:
"50"
,
"description"
:
"Python PyYAML module"
,
"author"
:
"FichteFoll"
,
"issues"
:
"https://github.com/packagecontrol/pyyaml/issues"
,
"releases"
:
[
{
"base"
:
"https://github.com/packagecontrol/pyyaml"
,
"tags"
:
true
,
"sublime_text"
:
"*"
}
]
},
{
"name"
:
"requests"
,
"load_order"
:
"50"
,
"description"
:
"Python requests module"
,
"author"
:
"FichteFoll"
,
"issues"
:
"https://github.com/packagecontrol/requests/issues"
,
"releases"
:
[
{
"base"
:
"https://github.com/packagecontrol/requests"
,
"tags"
:
true
,
"sublime_text"
:
"*"
}
]
},
{
"name"
:
"select-windows"
,
"load_order"
:
"02"
,
...
...
repository/e.json
View file @
f4d7bc05
...
...
@@ -37,7 +37,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -747,11 +747,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/f.json
View file @
f4d7bc05
...
...
@@ -157,11 +157,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -302,7 +302,7 @@
{
"name"
:
"FileBrowser"
,
"details"
:
"https://github.com/aziz/SublimeFileBrowser"
,
"labels"
:
[
"file navigation"
,
"file creation"
,
"file open"
],
"labels"
:
[
"file navigation"
,
"file creation"
,
"file open"
,
"sidebar"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
...
...
@@ -330,6 +330,17 @@
}
]
},
{
"name"
:
"FileCommands"
,
"details"
:
"https://github.com/tuvistavie/sublime-file-commands"
,
"labels"
:
[
"file navigation"
,
"utilities"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"FileDialog"
,
"details"
:
"https://github.com/shagabutdinov/sublime-file-dialog"
,
...
...
@@ -508,7 +519,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -661,6 +672,16 @@
}
]
},
{
"name"
:
"Flask Starter"
,
"details"
:
"https://github.com/geekpradd/Sublime-Flask-Starter"
,
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"tags"
:
true
}
]
},
{
"name"
:
"Flatron"
,
"details"
:
"https://github.com/NoahBuscher/Flatron"
,
...
...
@@ -1048,11 +1069,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/g.json
View file @
f4d7bc05
...
...
@@ -261,6 +261,25 @@
}
]
},
{
"name"
:
"Git Commit Message Syntax"
,
"details"
:
"https://github.com/adambullmer/sublime_git_commit_syntax"
,
"labels"
:
[
"git"
,
"language"
,
"syntax"
,
"syntax highlighting"
,
"commit"
],
"author"
:
"adambullmer"
,
"readme"
:
"https://raw.githubusercontent.com/adambullmer/sublime_git_commit_syntax/master/README.md"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Git Config"
,
"details"
:
"https://github.com/robballou/gitconfig-sublimetext"
,
...
...
repository/h.json
View file @
f4d7bc05
...
...
@@ -291,11 +291,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/i.json
View file @
f4d7bc05
...
...
@@ -447,6 +447,16 @@
}
]
},
{
"name"
:
"Interpol"
,
"details"
:
"https://github.com/kode4food/interpol-sublime"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"InterSystems Cache"
,
"details"
:
"https://github.com/brandonhorst/SublimeCache"
,
...
...
repository/j.json
View file @
f4d7bc05
...
...
@@ -333,6 +333,17 @@
}
]
},
{
"name"
:
"JDebug"
,
"details"
:
"https://github.com/jdebug/JDebug"
,
"labels"
:
[
"debugger"
,
"Java debugger"
,
"java"
,
"JDB"
],
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"tags"
:
true
}
]
},
{
"name"
:
"Jdf - Tool"
,
"details"
:
"https://github.com/wshxbqq/JdfSublime"
,
...
...
repository/m.json
View file @
f4d7bc05
...
...
@@ -820,6 +820,17 @@
}
]
},
{
"name"
:
"Mithrilizer"
,
"details"
:
"https://github.com/Bondifrench/Mithrilizer"
,
"labels"
:
[
"javascript"
,
"auto-complete"
,
"Mithril"
,
"snippets"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"MivaScript"
,
"details"
:
"https://github.com/zquintana/SublimeMivaScript"
,
...
...
repository/n.json
View file @
f4d7bc05
...
...
@@ -223,6 +223,17 @@
}
]
},
{
"name"
:
"ng-annotate Buildsystem"
,
"details"
:
"https://github.com/ctf0/ng-annotate_Buildsystem"
,
"labels"
:
[
"build system"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"ngdoc snippets"
,
"details"
:
"https://github.com/iamsebastian/sublime-ngdoc-snippets"
,
...
...
repository/o.json
View file @
f4d7bc05
...
...
@@ -87,6 +87,17 @@
}
]
},
{
"name"
:
"Oceanic Next Color Scheme"
,
"details"
:
"https://github.com/voronianski/oceanic-next-theme"
,
"labels"
:
[
"color scheme"
,
"javascript"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Oddly"
,
"details"
:
"https://github.com/laktak/sublime-oddly"
,
...
...
repository/p.json
View file @
f4d7bc05
...
...
@@ -928,7 +928,7 @@
{
"name"
:
"PlainNotes"
,
"details"
:
"https://github.com/aziz/PlainNotes"
,
"labels"
:
[
"notes"
,
"note taking"
,
"
todo
"
],
"labels"
:
[
"notes"
,
"note taking"
,
"
authoring"
,
"todo"
,
"tasks
"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
...
...
@@ -938,6 +938,7 @@
},
{
"details"
:
"https://github.com/aziz/PlainTasks"
,
"labels"
:
[
"todo"
,
"tasks"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
...
...
@@ -1422,7 +1423,7 @@
},
{
"name"
:
"Protocol Buffer Syntax"
,
"details"
:
"https://github.com/
awalterschulze
/sublime-protobuf-syntax"
,
"details"
:
"https://github.com/
vihangm
/sublime-protobuf-syntax"
,
"labels"
:
[
"language syntax"
],
"releases"
:
[
{
...
...
@@ -1842,7 +1843,7 @@
{
"sublime_text"
:
">=3000"
,
"platforms"
:
"windows"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/q.json
View file @
f4d7bc05
...
...
@@ -11,6 +11,16 @@
}
]
},
{
"name"
:
"QMakeProject"
,
"details"
:
"https://github.com/nsubiron/sublime-qmakeproject-syntax"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"QML"
,
"details"
:
"https://github.com/skozlovf/Sublime-QML"
,
...
...
@@ -111,7 +121,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/r.json
View file @
f4d7bc05
...
...
@@ -248,7 +248,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -512,11 +512,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/s.json
View file @
f4d7bc05
...
...
@@ -299,11 +299,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -782,11 +782,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -889,17 +889,6 @@
}
]
},
{
"name"
:
"Shell Command"
,
"details"
:
"https://github.com/markbirbeck/sublime-text-shell-command"
,
"labels"
:
[
"shell"
,
"emacs"
],
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"tags"
:
true
}
]
},
{
"name"
:
"Shell Turtlestein"
,
"details"
:
"https://github.com/misfo/Shell-Turtlestein"
,
...
...
@@ -914,6 +903,18 @@
}
]
},
{
"name"
:
"ShellCommand"
,
"details"
:
"https://github.com/markbirbeck/sublime-text-shell-command"
,
"labels"
:
[
"shell"
,
"emacs"
],
"previous_names"
:
[
"Shell Command"
],
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"tags"
:
true
}
]
},
{
"name"
:
"ShellStatus"
,
"details"
:
"https://github.com/shagabutdinov/sublime-shell-status"
,
...
...
@@ -1195,6 +1196,16 @@
}
]
},
{
"name"
:
"SingularitySnippets"
,
"details"
:
"https://github.com/blcook223/SingularitySnippets"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Sinon"
,
"details"
:
"https://github.com/mokkabonna/sublime-sinon"
,
...
...
@@ -2367,7 +2378,7 @@
"details"
:
"https://github.com/mavidser/SublimeInput"
,
"releases"
:
[
{
"sublime_text"
:
"
>=3000
"
,
"sublime_text"
:
"
*
"
,
"tags"
:
true
}
]
...
...
@@ -2902,7 +2913,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/t.json
View file @
f4d7bc05
...
...
@@ -53,7 +53,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -216,6 +216,16 @@
}
]
},
{
"name"
:
"Tera Term Language"
,
"details"
:
"https://bitbucket.org/tkyjhr/st_teraterm"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Term Presenter"
,
"details"
:
"https://github.com/fd/term-presenter-sublime"
,
...
...
@@ -378,11 +388,11 @@
"releases"
:
[
{
"sublime_text"
:
"<3000"
,
"
branch"
:
"ST2
"
"
tags"
:
"st2-
"
},
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"ST3
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -453,6 +463,17 @@
}
]
},
{
"name"
:
"Theme - Carmesim"
,
"details"
:
"https://github.com/sergiokopplin/carmesim"
,
"labels"
:
[
"theme"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Theme - Centurion"
,
"details"
:
"https://github.com/allanhortle/Centurion"
,
...
...
@@ -654,6 +675,17 @@
}
]
},
{
"name"
:
"Theme - LP"
,
"details"
:
"https://github.com/dubeg/theme-lp"
,
"labels"
:
[
"theme"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Theme - Lyte"
,
"details"
:
"https://github.com/lytedev/lyte-theme"
,
...
...
@@ -866,6 +898,17 @@
}
]
},
{
"name"
:
"Theme - Solarized Space"
,
"details"
:
"https://github.com/nsubiron/sublime-theme-solarized-space"
,
"labels"
:
[
"theme"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"Theme - Spacefunk"
,
"details"
:
"https://github.com/Twiebie/ST-Spacefunk"
,
...
...
@@ -948,7 +991,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"master
"
"
tags"
:
"st3-
"
}
]
},
...
...
@@ -957,7 +1000,7 @@
"releases"
:
[
{
"sublime_text"
:
">=3000"
,
"
branch"
:
"master
"
"
tags"
:
"st3-
"
}
]
},
...
...
repository/y.json
View file @
f4d7bc05
...
...
@@ -34,6 +34,16 @@
}
]
},
{
"name"
:
"Yara syntax highlighting and snippet"
,
"details"
:
"https://github.com/nyx0/yara"
,
"releases"
:
[
{
"sublime_text"
:
"*"
,
"tags"
:
true
}
]
},
{
"name"
:
"yardgen"
,
"details"
:
"https://bitbucket.org/fappelman/yardgen"
,
...
...
tests/test.py
View file @
f4d7bc05
...
...
@@ -27,6 +27,7 @@ if sys.version_info >= (3,):
generator_method_type
=
'method'
str_cls
=
str
else
:
from
.
import
unittest_compat
from
urlparse
import
urljoin
from
urllib2
import
HTTPError
,
urlopen
generator_method_type
=
'instancemethod'
...
...
tests/unittest_compat.py
View file @
f4d7bc05
import
sys
import
re
import
unittest
def
assertIn
(
self
,
member
,
container
,
msg
=
None
):
"""Just like self.assertTrue(a in b), but with a nicer default message."""
if
member
not
in
container
:
if
not
msg
:
msg
=
'
%
r not found in
%
r'
%
(
member
,
container
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertIn
=
assertIn
def
assertNotIn
(
self
,
member
,
container
,
msg
=
None
):
"""Just like self.assertTrue(a not in b), but with a nicer default message."""
if
member
in
container
:
if
not
msg
:
msg
=
'
%
s unexpectedly found in
%
s'
%
(
member
,
container
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertNotIn
=
assertNotIn
def
assertGreater
(
self
,
a
,
b
,
msg
=
None
):
"""Just like self.assertTrue(a > b), but with a nicer default message."""
if
not
a
>
b
:
if
not
msg
:
msg
=
'
%
s not greater than
%
s'
%
(
a
,
b
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertGreater
=
assertGreater
def
assertRegexpMatches
(
self
,
text
,
expected_regexp
,
msg
=
None
):
"""Fail the test unless the text matches the regular expression."""
if
isinstance
(
expected_regexp
,
basestring
):
expected_regexp
=
re
.
compile
(
expected_regexp
)
if
not
expected_regexp
.
search
(
text
):
msg
=
msg
or
"Regexp didn't match"
msg
=
'
%
s:
%
r not found in
%
r'
%
(
msg
,
expected_regexp
.
pattern
,
text
)
raise
self
.
failureException
(
msg
)
unittest
.
TestCase
.
assertRegex
=
assertRegexpMatches
def
assertNotRegexpMatches
(
self
,
text
,
unexpected_regexp
,
msg
=
None
):
"""Fail the test if the text matches the regular expression."""
if
isinstance
(
unexpected_regexp
,
basestring
):
unexpected_regexp
=
re
.
compile
(
unexpected_regexp
)
match
=
unexpected_regexp
.
search
(
text
)
if
match
:
msg
=
msg
or
"Regexp matched"
msg
=
'
%
s:
%
r matches
%
r in
%
r'
%
(
msg
,
text
[
match
.
start
():
match
.
end
()],
unexpected_regexp
.
pattern
,
text
)
raise
self
.
failureException
(
msg
)
unittest
.
TestCase
.
assertNotRegex
=
assertNotRegexpMatches
def
assertIsInstance
(
self
,
obj
,
cls
,
msg
=
None
):
"""Same as self.assertTrue(isinstance(obj, cls)), with a nicer
default message."""
if
not
isinstance
(
obj
,
cls
):
if
not
msg
:
msg
=
'
%
s is not an instance of
%
r'
%
(
obj
,
cls
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertIsInstance
=
assertIsInstance
if
sys
.
version_info
<
(
2
,
7
):
def
assertIn
(
self
,
member
,
container
,
msg
=
None
):
"""Just like self.assertTrue(a in b), but with a nicer default message."""
if
member
not
in
container
:
if
not
msg
:
msg
=
'
%
r not found in
%
r'
%
(
member
,
container
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertIn
=
assertIn
def
assertNotIn
(
self
,
member
,
container
,
msg
=
None
):
"""Just like self.assertTrue(a not in b), but with a nicer default message."""
if
member
in
container
:
if
not
msg
:
msg
=
'
%
s unexpectedly found in
%
s'
%
(
member
,
container
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertNotIn
=
assertNotIn
def
assertGreater
(
self
,
a
,
b
,
msg
=
None
):
"""Just like self.assertTrue(a > b), but with a nicer default message."""
if
not
a
>
b
:
if
not
msg
:
msg
=
'
%
s not greater than
%
s'
%
(
a
,
b
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertGreater
=
assertGreater
def
assertRegexpMatches
(
self
,
text
,
expected_regexp
,
msg
=
None
):
"""Fail the test unless the text matches the regular expression."""
if
isinstance
(
expected_regexp
,
basestring
):
expected_regexp
=
re
.
compile
(
expected_regexp
)
if
not
expected_regexp
.
search
(
text
):
msg
=
msg
or
"Regexp didn't match"
msg
=
'
%
s:
%
r not found in
%
r'
%
(
msg
,
expected_regexp
.
pattern
,
text
)
raise
self
.
failureException
(
msg
)
unittest
.
TestCase
.
assertRegex
=
assertRegexpMatches
def
assertNotRegexpMatches
(
self
,
text
,
unexpected_regexp
,
msg
=
None
):
"""Fail the test if the text matches the regular expression."""
if
isinstance
(
unexpected_regexp
,
basestring
):
unexpected_regexp
=
re
.
compile
(
unexpected_regexp
)
match
=
unexpected_regexp
.
search
(
text
)
if
match
:
msg
=
msg
or
"Regexp matched"
msg
=
'
%
s:
%
r matches
%
r in
%
r'
%
(
msg
,
text
[
match
.
start
():
match
.
end
()],
unexpected_regexp
.
pattern
,
text
)
raise
self
.
failureException
(
msg
)
unittest
.
TestCase
.
assertNotRegex
=
assertNotRegexpMatches
def
assertIsInstance
(
self
,
obj
,
cls
,
msg
=
None
):
"""Same as self.assertTrue(isinstance(obj, cls)), with a nicer
default message."""
if
not
isinstance
(
obj
,
cls
):
if
not
msg
:
msg
=
'
%
s is not an instance of
%
r'
%
(
obj
,
cls
)
self
.
fail
(
msg
)
unittest
.
TestCase
.
assertIsInstance
=
assertIsInstance
else
:
unittest
.
TestCase
.
assertRegex
=
unittest
.
TestCase
.
assertRegexpMatches
unittest
.
TestCase
.
assertNotRegex
=
unittest
.
TestCase
.
assertNotRegexpMatches
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment