Skip to content

Commit

Permalink
Partial cleanup of dev folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Jun 8, 2024
1 parent 8801663 commit 9d8efaa
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 35 deletions.
18 changes: 18 additions & 0 deletions dev/demo/demo_dynamic_analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
CommandLine:
xdoctest ~/code/xdoctest/dev/demo/demo_dynamic_analysis.py --analysis=auto
xdoctest ~/code/xdoctest/dev/demo/demo_dynamic_analysis.py --analysis=dynamic
xdoctest ~/code/xdoctest/dev/demo/demo_dynamic_analysis.py --xdoc-force-dynamic
"""


def func() -> None:
r''' Dynamic doctest
>>> %s
%s
'''
return

func.__doc__ %= ('print(1)', '1')
12 changes: 6 additions & 6 deletions dev/demo_errors.py → dev/demo/demo_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def demo1():
"""
CommandLine:
xdoctest -m ~/code/xdoctest/dev/demo_errors.py demo1
xdoctest -m ~/code/xdoctest/dev/demo/demo_errors.py demo1
Example:
>>> raise Exception('demo1')
Expand All @@ -20,7 +20,7 @@ def demo1():
def demo2():
"""
CommandLine:
xdoctest -m ~/code/xdoctest/dev/demo_errors.py demo2
xdoctest -m ~/code/xdoctest/dev/demo/demo_errors.py demo2
Example:
>>> print('error on different line')
Expand All @@ -32,7 +32,7 @@ def demo2():
def demo3():
"""
CommandLine:
xdoctest -m ~/code/xdoctest/dev/demo_errors.py demo3
xdoctest -m ~/code/xdoctest/dev/demo/demo_errors.py demo3
Example:
>>> print('demo5')
Expand All @@ -44,15 +44,15 @@ def demo3():
class Demo5(object):
"""
CommandLine:
xdoctest -m ~/code/xdoctest/dev/demo_errors.py Demo5
xdoctest -m ~/code/xdoctest/dev/demo/demo_errors.py Demo5
Example:
>>> raise Exception
"""
def demo5(self):
"""
CommandLine:
xdoctest -m ~/code/xdoctest/dev/demo_errors.py Demo5.demo5
xdoctest -m ~/code/xdoctest/dev/demo/demo_errors.py Demo5.demo5
Example:
>>> raise Exception
Expand Down Expand Up @@ -100,7 +100,7 @@ def demo_runtime_warning():
if __name__ == '__main__':
"""
CommandLine:
python ~/code/xdoctest/dev/demo_errors.py all
python ~/code/xdoctest/dev/demo/demo_errors.py all
"""
import xdoctest
xdoctest.doctest_module(__file__)
10 changes: 5 additions & 5 deletions dev/demo_issues.py → dev/demo/demo_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ def demo():
# Correctly reports skipped (although an only skipped test report
# should probably be yellow)
xdoctest -m dev/demo_issues.py demo_requires_skips_all_v1
xdoctest -m dev/demo/demo_issues.py demo_requires_skips_all_v1
# Incorrectly reports success
xdoctest -m dev/demo_issues.py demo_requires_skips_all_v2
xdoctest -m dev/demo/demo_issues.py demo_requires_skips_all_v2
# Correctly reports success
xdoctest -m dev/demo_issues.py demo_requires_skips_all_v2 --cliflag
xdoctest -m dev/demo/demo_issues.py demo_requires_skips_all_v2 --cliflag
# Correctly reports success
xdoctest -m dev/demo_issues.py demo_requires_skips_all_v1 --cliflag
xdoctest -m dev/demo/demo_issues.py demo_requires_skips_all_v1 --cliflag
"""

# Programatic reproduction (notice the first one also reports itself in
Expand All @@ -40,7 +40,7 @@ def demo():
xdoctest.doctest_callable(demo_requires_skips_all_v2)

import sys, ubelt
sys.path.append(ubelt.expandpath('~/code/xdoctest/dev'))
sys.path.append(ubelt.expandpath('~/code/xdoctest/dev/demo'))
import demo_issues

# Correctly reports skipped
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
CommandLine:
# Run with xdoctest runner
xdoctest ~/code/xdoctest/dev/demo_usage_with_logger.py
xdoctest ~/code/xdoctest/dev/demo/demo_usage_with_logger.py
# Run with pytest runner
pytest -s --xdoctest --xdoctest-verbose=3 ~/code/xdoctest/dev/demo_usage_with_logger.py
pytest -s --xdoctest --xdoctest-verbose=3 ~/code/xdoctest/dev/demo/demo_usage_with_logger.py
# Run with builtin main
python ~/code/xdoctest/dev/demo_usage_with_logger.py
python ~/code/xdoctest/dev/demo/demo_usage_with_logger.py
References:
.. [Issue111] https://github.com/Erotemic/xdoctest/issues/111
Expand Down
18 changes: 0 additions & 18 deletions dev/demo_dynamic_analysis.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
def interative_test_xdev_embed():
"""
CommandLine:
xdoctest -m dev/interactive_embed_tests.py interative_test_xdev_embed
xdoctest -m dev/demo/interactive_embed_tests.py interative_test_xdev_embed
Example:
>>> interative_test_xdev_embed()
Expand All @@ -16,7 +16,7 @@ def interative_test_xdev_embed():
def interative_test_ipdb_embed():
"""
CommandLine:
xdoctest -m dev/interactive_embed_tests.py interative_test_ipdb_embed
xdoctest -m dev/demo/interactive_embed_tests.py interative_test_ipdb_embed
Example:
>>> interative_test_ipdb_embed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ def _autogen_xdoctest_utils():
if __name__ == '__main__':
"""
CommandLine:
python ~/code/xdoctest/dev/port_ubelt_utils.py
python ~/code/xdoctest/dev/maintain/port_ubelt_utils.py
"""
_autogen_xdoctest_utils()

0 comments on commit 9d8efaa

Please sign in to comment.