From a5d5e77ad1f1fd63c7bf00309f0d3d71dc81ba03 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 17 Dec 2018 11:05:25 +0100 Subject: [PATCH] move unittests into tests/unit directory for easier test discovery so we don't skip tests without realizing --- .travis.yml | 5 ++--- tests/{ => unit}/contentproviders/test_git.py | 0 tests/{ => unit}/contentproviders/test_local.py | 0 tests/{ => unit}/test_args.py | 0 .../test_argumentvalidation.py} | 0 tests/{ => unit}/test_cache_from.py | 0 tests/{ => unit}/test_clone_depth.py | 0 tests/{ => unit}/test_connect_url.py | 0 tests/{ => unit}/test_editable.py | 0 tests/{env.py => unit/test_env.py} | 0 tests/{ => unit}/test_env_yml.py | 0 tests/{ => unit}/test_labels.py | 0 tests/{memlimit.py => unit/test_memlimit.py} | 0 tests/{ports.py => unit/test_ports.py} | 0 tests/{ => unit}/test_subdir.py | 0 tests/{users.py => unit/test_users.py} | 1 + tests/{ => unit}/test_utils.py | 0 tests/{volumes.py => unit/test_volumes.py} | 0 18 files changed, 3 insertions(+), 3 deletions(-) rename tests/{ => unit}/contentproviders/test_git.py (100%) rename tests/{ => unit}/contentproviders/test_local.py (100%) rename tests/{ => unit}/test_args.py (100%) rename tests/{argumentvalidation.py => unit/test_argumentvalidation.py} (100%) rename tests/{ => unit}/test_cache_from.py (100%) rename tests/{ => unit}/test_clone_depth.py (100%) rename tests/{ => unit}/test_connect_url.py (100%) rename tests/{ => unit}/test_editable.py (100%) rename tests/{env.py => unit/test_env.py} (100%) rename tests/{ => unit}/test_env_yml.py (100%) rename tests/{ => unit}/test_labels.py (100%) rename tests/{memlimit.py => unit/test_memlimit.py} (100%) rename tests/{ports.py => unit/test_ports.py} (100%) rename tests/{ => unit}/test_subdir.py (100%) rename tests/{users.py => unit/test_users.py} (96%) rename tests/{ => unit}/test_utils.py (100%) rename tests/{volumes.py => unit/test_volumes.py} (100%) diff --git a/.travis.yml b/.travis.yml index 2358d1a0..2aaa5368 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,9 +53,8 @@ env: - REPO_TYPE=r - REPO_TYPE=nix - REPO_TYPE=dockerfile - - REPO_TYPE=external/* - - REPO_TYPE=contentproviders/*.py - - REPO_TYPE=test_args.py + - REPO_TYPE=external + - REPO_TYPE=unit global: - secure: gX7IOkbjlvcDwIH24sOLhutINx6TZRwujEusMWh1dqgYG2D69qQai/mTrRXO9PGRrsvQwIBk4RcILKAiZnk5O2Z1hLoIHk/oU2mNUmE44dDm4Xf/VTTdeYhjeOTR9B+KJ9NVwPxuSEDSND3lD7yFfvCqNXykipEhBtTliLupjWVxxXnaz0aZTYHUPJwanxdUc06AphSPwZjtm1m3qMUU8v7UdTGGAdW3NlgkKw0Xx2x5W31fW676vskC/GNQAbcRociYipuhSFWV4lu+6d8XF2xVO97xtzf54tBQzt6RgVfAKtiqkEIYSzJQBBpkQ6SM6yg+fQoQpOo8jPU9ZBjvaoopUG9vn8HRS/OtQrDcG3kEFnFAnaes8Iqtidp1deTn27LIlfCTl7kTFOp8yaaNlIMHJTJKTEMRhfdDlBYx7qiH8e9d/z37lupzY2loLHeNHdMRS1uYsfacZsmrnu9vAdpQmP1LuHivBPZEvgerinADaJiekelWOIEn956pDrno/YgnzP0i9LEBYnbbunqT8oEzLintNt5CXGdhkiG60j38McKCIn4sD6jbMMwgsqVFdClCBersyorKhOs7P8at5vX4xf8fMiKPC8LZPzYVIQYzCjmwSOFQ+Rzmz5gSj+DRTANKfHpzZCKZEF6amBYMGE1O5osF8m6M10vtW9ToK+s= - secure: Cfhb0BUT54JjEZD8n44Jj+o1lt5p32Lfg7W/euTyZ61YylDx0+XEYTzfWcwxOzH9fLpWr6dDrBMGHA/FPqsWA5BkoGdiBJ1OOVy2tmDRButctobWM3SVwa+Rhh8bZWlK8yKT2S3n6CtK4mesmjzdbUShL7YnKOSl8LBaTT5Y5oT8Oxsq51pfg8fJUImim8H20t8H7emaEzZorF4OSGRtajcAgukt5YoAqTEVDq+bFRBHZalxkcRqLhsGe3CCWa28kjGTL4MPZpCI6/AXIXHzihfG3rGq40ZT8jZ9GPP3MBgkiJWtFiTC9h16G34b/JI/TD40zCmoW9/9oVjRK4UlLGCAv6bgzFhCRof2abhB9NTZDniNzkO0T15uHs3VLbLCPYB0xYyClAFxm2P6e8WPChyENKfTNh+803IKFFo4JaTjOnKzi89N72v5+bT6ghP932nmjJr1AO65xjw63CeDmaLoHDY73n11DibybWQgEeiNzJuSzbIHyqMPhW5XqeroEjKKstdPHtVfOViI9ywjEMy0HCPsspaVI7Aow0Iv8E4Ajvd32W7z0h0fSCx/i25hEOAo2vhBsmQKJA7IquB3N88M11L874h/8J+oc/osW1EB5z7Ukke5YCq94Qh3qImSIhJULXMMc1QjEqYsqhLXtiMG2HUge0Y5hwwnnbEIRMQ= diff --git a/tests/contentproviders/test_git.py b/tests/unit/contentproviders/test_git.py similarity index 100% rename from tests/contentproviders/test_git.py rename to tests/unit/contentproviders/test_git.py diff --git a/tests/contentproviders/test_local.py b/tests/unit/contentproviders/test_local.py similarity index 100% rename from tests/contentproviders/test_local.py rename to tests/unit/contentproviders/test_local.py diff --git a/tests/test_args.py b/tests/unit/test_args.py similarity index 100% rename from tests/test_args.py rename to tests/unit/test_args.py diff --git a/tests/argumentvalidation.py b/tests/unit/test_argumentvalidation.py similarity index 100% rename from tests/argumentvalidation.py rename to tests/unit/test_argumentvalidation.py diff --git a/tests/test_cache_from.py b/tests/unit/test_cache_from.py similarity index 100% rename from tests/test_cache_from.py rename to tests/unit/test_cache_from.py diff --git a/tests/test_clone_depth.py b/tests/unit/test_clone_depth.py similarity index 100% rename from tests/test_clone_depth.py rename to tests/unit/test_clone_depth.py diff --git a/tests/test_connect_url.py b/tests/unit/test_connect_url.py similarity index 100% rename from tests/test_connect_url.py rename to tests/unit/test_connect_url.py diff --git a/tests/test_editable.py b/tests/unit/test_editable.py similarity index 100% rename from tests/test_editable.py rename to tests/unit/test_editable.py diff --git a/tests/env.py b/tests/unit/test_env.py similarity index 100% rename from tests/env.py rename to tests/unit/test_env.py diff --git a/tests/test_env_yml.py b/tests/unit/test_env_yml.py similarity index 100% rename from tests/test_env_yml.py rename to tests/unit/test_env_yml.py diff --git a/tests/test_labels.py b/tests/unit/test_labels.py similarity index 100% rename from tests/test_labels.py rename to tests/unit/test_labels.py diff --git a/tests/memlimit.py b/tests/unit/test_memlimit.py similarity index 100% rename from tests/memlimit.py rename to tests/unit/test_memlimit.py diff --git a/tests/ports.py b/tests/unit/test_ports.py similarity index 100% rename from tests/ports.py rename to tests/unit/test_ports.py diff --git a/tests/test_subdir.py b/tests/unit/test_subdir.py similarity index 100% rename from tests/test_subdir.py rename to tests/unit/test_subdir.py diff --git a/tests/users.py b/tests/unit/test_users.py similarity index 96% rename from tests/users.py rename to tests/unit/test_users.py index a3714e2c..b7fd07d7 100644 --- a/tests/users.py +++ b/tests/unit/test_users.py @@ -15,6 +15,7 @@ def test_user(): username = os.getlogin() userid = str(os.geteuid()) with tempfile.TemporaryDirectory() as tmpdir: + tmpdir = os.path.realpath(tmpdir) subprocess.check_call([ 'repo2docker', '-v', '{}:/home/{}'.format(tmpdir, username), diff --git a/tests/test_utils.py b/tests/unit/test_utils.py similarity index 100% rename from tests/test_utils.py rename to tests/unit/test_utils.py diff --git a/tests/volumes.py b/tests/unit/test_volumes.py similarity index 100% rename from tests/volumes.py rename to tests/unit/test_volumes.py