From a2373cc52677fb960781ed1c797fa5197db6cd8f Mon Sep 17 00:00:00 2001
From: Natalie Weizenbaum <nweiz@google.com>
Date: Thu, 21 May 2015 17:11:41 -0700
Subject: [PATCH] Use "package:" imports for pub.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1153643002
---
 bin/pub.dart                                  |  2 +-
 lib/src/dart.dart                             |  3 +-
 test/ascii_tree_test.dart                     |  5 +--
 test/barback/fails_if_args_with_all_test.dart |  2 +-
 .../fails_if_dir_arg_does_not_exist_test.dart |  2 +-
 .../fails_if_dir_outside_package_test.dart    |  2 +-
 .../fails_if_no_default_dirs_test.dart        |  2 +-
 ...ll_with_no_buildable_directories_test.dart |  2 +-
 .../fails_on_disallowed_directories_test.dart |  2 +-
 ...fails_on_overlapping_directories_test.dart |  2 +-
 test/barback/utils.dart                       |  2 +-
 test/build/outputs_error_to_json_test.dart    |  2 +-
 test/cache/add/bad_version_test.dart          |  3 +-
 test/cache/add/missing_package_arg_test.dart  |  3 +-
 test/cache/add/package_not_found_test.dart    |  3 +-
 test/cache/add/unexpected_arguments_test.dart |  3 +-
 test/cache/repair/handles_failure_test.dart   |  2 +-
 .../repair/reinstalls_git_packages_test.dart  |  2 +-
 .../does_not_support_invalid_option_test.dart |  3 +-
 .../reports_dart_parse_errors_test.dart       |  2 +-
 test/dependency_computer/error_test.dart      |  2 +-
 test/dependency_computer/utils.dart           | 18 ++++-----
 test/descriptor.dart                          |  6 +--
 test/descriptor/git.dart                      |  3 +-
 test/descriptor/tar.dart                      |  2 +-
 .../dry_run_does_not_apply_changes_test.dart  |  2 +-
 test/error_group_test.dart                    |  5 +--
 ...nfetched_revision_of_cached_repo_test.dart |  2 +-
 .../dependency_name_match_pubspec_test.dart   |  2 +-
 .../doesnt_fetch_if_nothing_changes_test.dart |  2 +-
 test/get/git/lock_version_test.dart           |  2 +-
 .../locked_revision_without_repo_test.dart    |  2 +-
 test/get/git/require_pubspec_name_test.dart   |  2 +-
 test/get/hosted/get_test.dart                 |  3 +-
 ...age_with_busted_dev_dependencies_test.dart |  3 +-
 test/get/hosted/stay_locked_test.dart         |  2 +-
 .../unlock_if_version_doesnt_exist_test.dart  |  2 +-
 test/get/path/empty_pubspec_test.dart         |  2 +-
 test/get/path/nonexistent_dir_test.dart       |  2 +-
 test/get/path/relative_path_test.dart         |  4 +-
 .../activate_hosted_after_git_test.dart       |  2 +-
 .../activate_hosted_after_path_test.dart      |  2 +-
 .../activate_path_after_hosted_test.dart      |  2 +-
 test/global/activate/bad_version_test.dart    |  2 +-
 .../activate/constraint_with_path_test.dart   |  2 +-
 .../activate/empty_constraint_test.dart       |  3 +-
 .../activate/missing_package_arg_test.dart    |  2 +-
 test/global/activate/path_package_test.dart   |  2 +-
 .../activate/unexpected_arguments_test.dart   |  2 +-
 .../global/activate/unknown_package_test.dart |  2 +-
 ...licit_and_no_executables_options_test.dart |  2 +-
 .../binstubs/outdated_snapshot_test.dart      |  2 +-
 .../unknown_explicit_executable_test.dart     |  2 +-
 .../deactivate/missing_package_arg_test.dart  |  3 +-
 test/global/deactivate/path_package_test.dart |  2 +-
 .../deactivate/unexpected_arguments_test.dart |  3 +-
 .../deactivate/unknown_package_test.dart      |  3 +-
 test/global/list_test.dart                    |  2 +-
 .../run/errors_if_outside_bin_test.dart       |  2 +-
 .../run/implicit_executable_name_test.dart    |  3 +-
 .../run/missing_executable_arg_test.dart      |  3 +-
 .../global/run/missing_path_package_test.dart |  2 +-
 test/global/run/nonexistent_script_test.dart  |  2 +-
 test/global/run/unknown_package_test.dart     |  2 +-
 ...il_gracefully_on_missing_package_test.dart |  3 +-
 .../fail_gracefully_on_url_resolve_test.dart  |  3 +-
 test/implicit_barback_dependency_test.dart    |  2 +-
 test/implicit_dependency_test.dart            |  2 +-
 test/io_test.dart                             |  2 +-
 .../archives_and_uploads_a_package_test.dart  |  2 +-
 ...d_storage_upload_doesnt_redirect_test.dart |  2 +-
 ...storage_upload_provides_an_error_test.dart |  2 +-
 .../does_not_publish_if_private_test.dart     |  2 +-
 ...blish_if_private_with_server_arg_test.dart |  2 +-
 ..._cannot_be_combined_with_dry_run_test.dart |  2 +-
 ...orce_does_not_publish_if_private_test.dart |  2 +-
 ..._not_publish_if_there_are_errors_test.dart |  2 +-
 ..._tests_are_no_warnings_or_errors_test.dart |  2 +-
 ..._publishes_if_there_are_warnings_test.dart |  2 +-
 test/lish/many_files_test.dart                |  2 +-
 ...tion_has_a_warning_and_continues_test.dart |  2 +-
 ...on_has_a_warning_and_is_canceled_test.dart |  2 +-
 .../package_validation_has_an_error_test.dart |  2 +-
 test/lish/preview_errors_if_private_test.dart |  2 +-
 ...package_validation_has_a_warning_test.dart |  2 +-
 ...ckage_validation_has_no_warnings_test.dart |  2 +-
 ...er_arg_does_not_override_private_test.dart |  2 +-
 test/lish/utils.dart                          |  2 +-
 .../ignores_updated_pubspec_test.dart         |  2 +-
 .../includes_dev_dependencies_test.dart       |  2 +-
 .../lists_dependency_directories_test.dart    |  2 +-
 .../lockfile_error_test.dart                  |  4 +-
 .../missing_pubspec_test.dart                 |  2 +-
 test/list_package_dirs/no_lockfile_test.dart  |  3 +-
 .../list_package_dirs/pubspec_error_test.dart |  4 +-
 test/lock_file_test.dart                      | 10 ++---
 test/oauth2/utils.dart                        |  2 +-
 ...efresh_token_authenticates_again_test.dart |  2 +-
 test/package_list_files_test.dart             |  6 +--
 test/preprocess_test.dart                     |  2 +-
 test/pub_get_and_upgrade_test.dart            |  2 +-
 test/pub_test.dart                            |  2 +-
 test/pub_uploader_test.dart                   |  4 +-
 test/pubspec_test.dart                        | 10 ++---
 test/real_version_test.dart                   |  4 +-
 ...errors_if_no_executable_is_given_test.dart |  3 +-
 ...rs_if_only_transitive_dependency_test.dart |  3 +-
 .../errors_if_path_in_dependency_test.dart    |  3 +-
 test/run/nonexistent_dependency_test.dart     |  3 +-
 ...nonexistent_script_in_dependency_test.dart |  2 +-
 test/run/nonexistent_script_test.dart         |  2 +-
 ...t_if_dependency_is_not_installed_test.dart |  2 +-
 ...tive_dependency_is_not_installed_test.dart |  2 +-
 test/serve/missing_file_test.dart             |  2 +-
 .../serve/native_watch_removed_file_test.dart |  2 +-
 test/serve/utils.dart                         |  2 +-
 test/serve/watch_removed_file_test.dart       |  2 +-
 test/serve/web_socket/path_to_urls_test.dart  |  2 +-
 test/serve_packages.dart                      |  4 +-
 test/test_pub.dart                            | 38 +++++++++----------
 test/transcript_test.dart                     |  3 +-
 test/transformer/can_log_messages_test.dart   |  2 +-
 ...ubspec_with_reserved_transformer_test.dart |  2 +-
 ...sform_from_a_deps_dev_dependency_test.dart |  2 +-
 ..._transform_from_a_non_dependency_test.dart |  2 +-
 .../dry_run_does_not_apply_changes_test.dart  |  2 +-
 .../upgrade_to_incompatible_pubspec_test.dart |  2 +-
 test/utils_test.dart                          |  3 +-
 test/validator/compiled_dartdoc_test.dart     |  6 +--
 test/validator/dependency_override_test.dart  |  7 ++--
 test/validator/dependency_test.dart           |  6 +--
 test/validator/directory_test.dart            |  6 +--
 test/validator/executable_test.dart           |  6 +--
 test/validator/license_test.dart              |  8 ++--
 test/validator/name_test.dart                 |  8 ++--
 test/validator/pubspec_field_test.dart        |  6 +--
 test/validator/sdk_constraint_test.dart       |  6 +--
 test/validator/size_test.dart                 |  2 +-
 test/validator/utf8_readme_test.dart          |  6 +--
 test/version_solver_test.dart                 | 18 ++++-----
 140 files changed, 239 insertions(+), 220 deletions(-)

diff --git a/bin/pub.dart b/bin/pub.dart
index e781f947..ede1b42c 100644
--- a/bin/pub.dart
+++ b/bin/pub.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../lib/src/command_runner.dart';
+import 'package:pub/src/command_runner.dart';
 
 void main(List<String> arguments) {
   new PubCommandRunner().run(arguments);
diff --git a/lib/src/dart.dart b/lib/src/dart.dart
index 05a8ccd5..1d2d0e0d 100644
--- a/lib/src/dart.dart
+++ b/lib/src/dart.dart
@@ -10,11 +10,10 @@ import 'dart:io';
 import 'dart:isolate';
 
 import 'package:analyzer/analyzer.dart';
-import 'package:path/path.dart' as path;
-
 import 'package:compiler_unsupported/compiler.dart' as compiler;
 import 'package:compiler_unsupported/src/filenames.dart'
     show appendSlash;
+import 'package:path/path.dart' as path;
 
 import 'asset/dart/serialize.dart';
 import 'io.dart';
diff --git a/test/ascii_tree_test.dart b/test/ascii_tree_test.dart
index 96d81ee7..9475fe0e 100644
--- a/test/ascii_tree_test.dart
+++ b/test/ascii_tree_test.dart
@@ -4,11 +4,10 @@
 
 library lock_file_test;
 
+import 'package:pub/src/ascii_tree.dart' as tree;
+import 'package:pub/src/utils.dart';
 import 'package:unittest/unittest.dart';
 
-import '../lib/src/ascii_tree.dart' as tree;
-import '../lib/src/utils.dart';
-
 main() {
   runningAsTest = true;
 
diff --git a/test/barback/fails_if_args_with_all_test.dart b/test/barback/fails_if_args_with_all_test.dart
index 42f79431..d627eee5 100644
--- a/test/barback/fails_if_args_with_all_test.dart
+++ b/test/barback/fails_if_args_with_all_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/fails_if_dir_arg_does_not_exist_test.dart b/test/barback/fails_if_dir_arg_does_not_exist_test.dart
index 2f5d56e9..92f9a362 100644
--- a/test/barback/fails_if_dir_arg_does_not_exist_test.dart
+++ b/test/barback/fails_if_dir_arg_does_not_exist_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/fails_if_dir_outside_package_test.dart b/test/barback/fails_if_dir_outside_package_test.dart
index 7e662187..2c504d15 100644
--- a/test/barback/fails_if_dir_outside_package_test.dart
+++ b/test/barback/fails_if_dir_outside_package_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/fails_if_no_default_dirs_test.dart b/test/barback/fails_if_no_default_dirs_test.dart
index 3b0aa972..5e2338c2 100644
--- a/test/barback/fails_if_no_default_dirs_test.dart
+++ b/test/barback/fails_if_no_default_dirs_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/fails_on_all_with_no_buildable_directories_test.dart b/test/barback/fails_on_all_with_no_buildable_directories_test.dart
index 8c0a06fa..e9532443 100644
--- a/test/barback/fails_on_all_with_no_buildable_directories_test.dart
+++ b/test/barback/fails_on_all_with_no_buildable_directories_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/fails_on_disallowed_directories_test.dart b/test/barback/fails_on_disallowed_directories_test.dart
index a57d8e7d..0eba8dde 100644
--- a/test/barback/fails_on_disallowed_directories_test.dart
+++ b/test/barback/fails_on_disallowed_directories_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:path/path.dart' as path;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/fails_on_overlapping_directories_test.dart b/test/barback/fails_on_overlapping_directories_test.dart
index 8e98b867..7ba17dc5 100644
--- a/test/barback/fails_on_overlapping_directories_test.dart
+++ b/test/barback/fails_on_overlapping_directories_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/barback/utils.dart b/test/barback/utils.dart
index e4d9efed..7f444f91 100644
--- a/test/barback/utils.dart
+++ b/test/barback/utils.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../test_pub.dart';
 
 /// Runs separate integration tests for "pub build", "pub serve", and
diff --git a/test/build/outputs_error_to_json_test.dart b/test/build/outputs_error_to_json_test.dart
index bbd31fdd..c6a4fef1 100644
--- a/test/build/outputs_error_to_json_test.dart
+++ b/test/build/outputs_error_to_json_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/cache/add/bad_version_test.dart b/test/cache/add/bad_version_test.dart
index c0df5aa9..db3bd3a4 100644
--- a/test/cache/add/bad_version_test.dart
+++ b/test/cache/add/bad_version_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/cache/add/missing_package_arg_test.dart b/test/cache/add/missing_package_arg_test.dart
index 4229af7c..7d827b1a 100644
--- a/test/cache/add/missing_package_arg_test.dart
+++ b/test/cache/add/missing_package_arg_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/cache/add/package_not_found_test.dart b/test/cache/add/package_not_found_test.dart
index 1ee9daff..ae4290b1 100644
--- a/test/cache/add/package_not_found_test.dart
+++ b/test/cache/add/package_not_found_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/cache/add/unexpected_arguments_test.dart b/test/cache/add/unexpected_arguments_test.dart
index 0dec65a2..d6d56fc0 100644
--- a/test/cache/add/unexpected_arguments_test.dart
+++ b/test/cache/add/unexpected_arguments_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/cache/repair/handles_failure_test.dart b/test/cache/repair/handles_failure_test.dart
index 6f9e009b..da27d542 100644
--- a/test/cache/repair/handles_failure_test.dart
+++ b/test/cache/repair/handles_failure_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/cache/repair/reinstalls_git_packages_test.dart b/test/cache/repair/reinstalls_git_packages_test.dart
index 138cd04e..33db0186 100644
--- a/test/cache/repair/reinstalls_git_packages_test.dart
+++ b/test/cache/repair/reinstalls_git_packages_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/dart2js/does_not_support_invalid_option_test.dart b/test/dart2js/does_not_support_invalid_option_test.dart
index 1d299198..93c0cdc3 100644
--- a/test/dart2js/does_not_support_invalid_option_test.dart
+++ b/test/dart2js/does_not_support_invalid_option_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import '../serve/utils.dart';
diff --git a/test/dart2js/reports_dart_parse_errors_test.dart b/test/dart2js/reports_dart_parse_errors_test.dart
index 0821b865..5f6829ed 100644
--- a/test/dart2js/reports_dart_parse_errors_test.dart
+++ b/test/dart2js/reports_dart_parse_errors_test.dart
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/dependency_computer/error_test.dart b/test/dependency_computer/error_test.dart
index a06a5661..ec88be00 100644
--- a/test/dependency_computer/error_test.dart
+++ b/test/dependency_computer/error_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exceptions.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exceptions.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/dependency_computer/utils.dart b/test/dependency_computer/utils.dart
index 87ce9692..2bd12d1b 100644
--- a/test/dependency_computer/utils.dart
+++ b/test/dependency_computer/utils.dart
@@ -6,17 +6,17 @@ library pub_tests;
 
 import 'package:barback/barback.dart';
 import 'package:path/path.dart' as p;
+import 'package:pub/src/barback/cycle_exception.dart';
+import 'package:pub/src/barback/dependency_computer.dart';
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/io.dart';
+import 'package:pub/src/package.dart';
+import 'package:pub/src/package_graph.dart';
+import 'package:pub/src/source/path.dart';
+import 'package:pub/src/system_cache.dart';
+import 'package:pub/src/utils.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/barback/cycle_exception.dart';
-import '../../lib/src/barback/dependency_computer.dart';
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/io.dart';
-import '../../lib/src/package.dart';
-import '../../lib/src/package_graph.dart';
-import '../../lib/src/source/path.dart';
-import '../../lib/src/system_cache.dart';
-import '../../lib/src/utils.dart';
 import '../test_pub.dart';
 
 /// Expects that [DependencyComputer.transformersNeededByTransformers] will
diff --git a/test/descriptor.dart b/test/descriptor.dart
index 67db4724..9890ba36 100644
--- a/test/descriptor.dart
+++ b/test/descriptor.dart
@@ -6,11 +6,11 @@
 library descriptor;
 
 import 'package:oauth2/oauth2.dart' as oauth2;
-import 'package:scheduled_test/scheduled_server.dart';
+import 'package:pub/src/io.dart';
+import 'package:pub/src/utils.dart';
 import 'package:scheduled_test/descriptor.dart';
+import 'package:scheduled_test/scheduled_server.dart';
 
-import '../lib/src/io.dart';
-import '../lib/src/utils.dart';
 import 'descriptor/git.dart';
 import 'descriptor/tar.dart';
 import 'test_pub.dart';
diff --git a/test/descriptor/git.dart b/test/descriptor/git.dart
index 0ccf2e3d..d89c02b9 100644
--- a/test/descriptor/git.dart
+++ b/test/descriptor/git.dart
@@ -7,11 +7,10 @@ library descriptor.git;
 import 'dart:async';
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/git.dart' as git;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/descriptor.dart';
 
-import '../../lib/src/git.dart' as git;
-
 /// Describes a Git repository and its contents.
 class GitRepoDescriptor extends DirectoryDescriptor {
   GitRepoDescriptor(String name, List<Descriptor> contents)
diff --git a/test/descriptor/tar.dart b/test/descriptor/tar.dart
index 2a04a034..3c818cdd 100644
--- a/test/descriptor/tar.dart
+++ b/test/descriptor/tar.dart
@@ -7,10 +7,10 @@ library descriptor.tar;
 import 'dart:async';
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/descriptor.dart';
 
-import '../../lib/src/io.dart';
 
 /// Describes a tar file and its contents.
 class TarFileDescriptor extends DirectoryDescriptor
diff --git a/test/downgrade/dry_run_does_not_apply_changes_test.dart b/test/downgrade/dry_run_does_not_apply_changes_test.dart
index c1f8335c..69af967e 100644
--- a/test/downgrade/dry_run_does_not_apply_changes_test.dart
+++ b/test/downgrade/dry_run_does_not_apply_changes_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/error_group_test.dart b/test/error_group_test.dart
index 331a1ffd..cd85f155 100644
--- a/test/error_group_test.dart
+++ b/test/error_group_test.dart
@@ -6,11 +6,10 @@ library error_group_test;
 
 import 'dart:async';
 
+import 'package:pub/src/error_group.dart';
+import 'package:pub/src/utils.dart';
 import 'package:unittest/unittest.dart';
 
-import '../lib/src/error_group.dart';
-import '../lib/src/utils.dart';
-
 ErrorGroup errorGroup;
 
 // TODO(nweiz): once there's a global error handler, we should test that it does
diff --git a/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart b/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
index 3ebc04cd..8b454874 100644
--- a/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
+++ b/test/get/git/check_out_unfetched_revision_of_cached_repo_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/git/dependency_name_match_pubspec_test.dart b/test/get/git/dependency_name_match_pubspec_test.dart
index 880a2513..c4946b1e 100644
--- a/test/get/git/dependency_name_match_pubspec_test.dart
+++ b/test/get/git/dependency_name_match_pubspec_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/git/doesnt_fetch_if_nothing_changes_test.dart b/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
index 54cd98c6..e921338c 100644
--- a/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
+++ b/test/get/git/doesnt_fetch_if_nothing_changes_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/git/lock_version_test.dart b/test/get/git/lock_version_test.dart
index 0d764576..4d97527a 100644
--- a/test/get/git/lock_version_test.dart
+++ b/test/get/git/lock_version_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/git/locked_revision_without_repo_test.dart b/test/get/git/locked_revision_without_repo_test.dart
index 137e3841..fac0becd 100644
--- a/test/get/git/locked_revision_without_repo_test.dart
+++ b/test/get/git/locked_revision_without_repo_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/git/require_pubspec_name_test.dart b/test/get/git/require_pubspec_name_test.dart
index 530cc82b..22617027 100644
--- a/test/get/git/require_pubspec_name_test.dart
+++ b/test/get/git/require_pubspec_name_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/hosted/get_test.dart b/test/get/hosted/get_test.dart
index 58890c81..2159aa78 100644
--- a/test/get/hosted/get_test.dart
+++ b/test/get/hosted/get_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart b/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
index 2b8f2bff..b62afcbe 100644
--- a/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
+++ b/test/get/hosted/gets_a_package_with_busted_dev_dependencies_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/hosted/stay_locked_test.dart b/test/get/hosted/stay_locked_test.dart
index a43ad2e0..6f5920d6 100644
--- a/test/get/hosted/stay_locked_test.dart
+++ b/test/get/hosted/stay_locked_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/hosted/unlock_if_version_doesnt_exist_test.dart b/test/get/hosted/unlock_if_version_doesnt_exist_test.dart
index a3f57ff8..4c195ebe 100644
--- a/test/get/hosted/unlock_if_version_doesnt_exist_test.dart
+++ b/test/get/hosted/unlock_if_version_doesnt_exist_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/path/empty_pubspec_test.dart b/test/get/path/empty_pubspec_test.dart
index 4950bec5..36993e87 100644
--- a/test/get/path/empty_pubspec_test.dart
+++ b/test/get/path/empty_pubspec_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/path/nonexistent_dir_test.dart b/test/get/path/nonexistent_dir_test.dart
index 0bdfc633..1120c90d 100644
--- a/test/get/path/nonexistent_dir_test.dart
+++ b/test/get/path/nonexistent_dir_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/get/path/relative_path_test.dart b/test/get/path/relative_path_test.dart
index d9f8ce86..3f7dcc24 100644
--- a/test/get/path/relative_path_test.dart
+++ b/test/get/path/relative_path_test.dart
@@ -3,11 +3,11 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/lock_file.dart';
+import 'package:pub/src/source_registry.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:unittest/unittest.dart';
 
-import '../../../lib/src/lock_file.dart';
-import '../../../lib/src/source_registry.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/activate/activate_hosted_after_git_test.dart b/test/global/activate/activate_hosted_after_git_test.dart
index 88e9913a..05666bd3 100644
--- a/test/global/activate/activate_hosted_after_git_test.dart
+++ b/test/global/activate/activate_hosted_after_git_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/activate/activate_hosted_after_path_test.dart b/test/global/activate/activate_hosted_after_path_test.dart
index a3d42590..6180b68e 100644
--- a/test/global/activate/activate_hosted_after_path_test.dart
+++ b/test/global/activate/activate_hosted_after_path_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/activate/activate_path_after_hosted_test.dart b/test/global/activate/activate_path_after_hosted_test.dart
index 30bfbd7c..edbfc5f2 100644
--- a/test/global/activate/activate_path_after_hosted_test.dart
+++ b/test/global/activate/activate_path_after_hosted_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/activate/bad_version_test.dart b/test/global/activate/bad_version_test.dart
index 9db057ad..95b2a747 100644
--- a/test/global/activate/bad_version_test.dart
+++ b/test/global/activate/bad_version_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/activate/constraint_with_path_test.dart b/test/global/activate/constraint_with_path_test.dart
index 1e5412f4..ab1fe1c5 100644
--- a/test/global/activate/constraint_with_path_test.dart
+++ b/test/global/activate/constraint_with_path_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/activate/empty_constraint_test.dart b/test/global/activate/empty_constraint_test.dart
index c1f6f026..3b4edefd 100644
--- a/test/global/activate/empty_constraint_test.dart
+++ b/test/global/activate/empty_constraint_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/activate/missing_package_arg_test.dart b/test/global/activate/missing_package_arg_test.dart
index 72fbc972..08f50769 100644
--- a/test/global/activate/missing_package_arg_test.dart
+++ b/test/global/activate/missing_package_arg_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/activate/path_package_test.dart b/test/global/activate/path_package_test.dart
index 8f5a2d3a..51ac483b 100644
--- a/test/global/activate/path_package_test.dart
+++ b/test/global/activate/path_package_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/activate/unexpected_arguments_test.dart b/test/global/activate/unexpected_arguments_test.dart
index 24d0e2ce..8d97c40a 100644
--- a/test/global/activate/unexpected_arguments_test.dart
+++ b/test/global/activate/unexpected_arguments_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/activate/unknown_package_test.dart b/test/global/activate/unknown_package_test.dart
index 70e0b971..b611e6ce 100644
--- a/test/global/activate/unknown_package_test.dart
+++ b/test/global/activate/unknown_package_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/binstubs/explicit_and_no_executables_options_test.dart b/test/global/binstubs/explicit_and_no_executables_options_test.dart
index 65c67ada..ef17d776 100644
--- a/test/global/binstubs/explicit_and_no_executables_options_test.dart
+++ b/test/global/binstubs/explicit_and_no_executables_options_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/binstubs/outdated_snapshot_test.dart b/test/global/binstubs/outdated_snapshot_test.dart
index 9e6acc9a..3047a3c6 100644
--- a/test/global/binstubs/outdated_snapshot_test.dart
+++ b/test/global/binstubs/outdated_snapshot_test.dart
@@ -5,11 +5,11 @@
 import 'dart:io';
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 import 'utils.dart';
diff --git a/test/global/binstubs/unknown_explicit_executable_test.dart b/test/global/binstubs/unknown_explicit_executable_test.dart
index ae1e0e0f..731f2084 100644
--- a/test/global/binstubs/unknown_explicit_executable_test.dart
+++ b/test/global/binstubs/unknown_explicit_executable_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_stream.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/deactivate/missing_package_arg_test.dart b/test/global/deactivate/missing_package_arg_test.dart
index 482947da..f095856e 100644
--- a/test/global/deactivate/missing_package_arg_test.dart
+++ b/test/global/deactivate/missing_package_arg_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/deactivate/path_package_test.dart b/test/global/deactivate/path_package_test.dart
index 3241efc4..381a1e54 100644
--- a/test/global/deactivate/path_package_test.dart
+++ b/test/global/deactivate/path_package_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/deactivate/unexpected_arguments_test.dart b/test/global/deactivate/unexpected_arguments_test.dart
index f57fcccb..044d1b8e 100644
--- a/test/global/deactivate/unexpected_arguments_test.dart
+++ b/test/global/deactivate/unexpected_arguments_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/deactivate/unknown_package_test.dart b/test/global/deactivate/unknown_package_test.dart
index 28864300..a8758240 100644
--- a/test/global/deactivate/unknown_package_test.dart
+++ b/test/global/deactivate/unknown_package_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/list_test.dart b/test/global/list_test.dart
index 782c9b0f..a6c7475e 100644
--- a/test/global/list_test.dart
+++ b/test/global/list_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/global/run/errors_if_outside_bin_test.dart b/test/global/run/errors_if_outside_bin_test.dart
index cb149bbc..7a69220b 100644
--- a/test/global/run/errors_if_outside_bin_test.dart
+++ b/test/global/run/errors_if_outside_bin_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/run/implicit_executable_name_test.dart b/test/global/run/implicit_executable_name_test.dart
index da68c8e1..18b2fcb7 100644
--- a/test/global/run/implicit_executable_name_test.dart
+++ b/test/global/run/implicit_executable_name_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/run/missing_executable_arg_test.dart b/test/global/run/missing_executable_arg_test.dart
index 01c798d7..bf6dfead 100644
--- a/test/global/run/missing_executable_arg_test.dart
+++ b/test/global/run/missing_executable_arg_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/run/missing_path_package_test.dart b/test/global/run/missing_path_package_test.dart
index a8be8c81..12b9d0ad 100644
--- a/test/global/run/missing_path_package_test.dart
+++ b/test/global/run/missing_path_package_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/global/run/nonexistent_script_test.dart b/test/global/run/nonexistent_script_test.dart
index d69c65ab..986c088e 100644
--- a/test/global/run/nonexistent_script_test.dart
+++ b/test/global/run/nonexistent_script_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/global/run/unknown_package_test.dart b/test/global/run/unknown_package_test.dart
index 291577a3..338aee1c 100644
--- a/test/global/run/unknown_package_test.dart
+++ b/test/global/run/unknown_package_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../test_pub.dart';
 
 main() {
diff --git a/test/hosted/fail_gracefully_on_missing_package_test.dart b/test/hosted/fail_gracefully_on_missing_package_test.dart
index df53819d..d4ac07fe 100644
--- a/test/hosted/fail_gracefully_on_missing_package_test.dart
+++ b/test/hosted/fail_gracefully_on_missing_package_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import '../test_pub.dart';
diff --git a/test/hosted/fail_gracefully_on_url_resolve_test.dart b/test/hosted/fail_gracefully_on_url_resolve_test.dart
index 2936829b..56487df0 100644
--- a/test/hosted/fail_gracefully_on_url_resolve_test.dart
+++ b/test/hosted/fail_gracefully_on_url_resolve_test.dart
@@ -4,7 +4,8 @@
 
 library pub_tests;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/implicit_barback_dependency_test.dart b/test/implicit_barback_dependency_test.dart
index 0d16e51c..88d8a4fd 100644
--- a/test/implicit_barback_dependency_test.dart
+++ b/test/implicit_barback_dependency_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/barback.dart' as barback;
 import 'package:pub_semver/pub_semver.dart';
 
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
-import '../lib/src/barback.dart' as barback;
 
 main() {
   initConfig();
diff --git a/test/implicit_dependency_test.dart b/test/implicit_dependency_test.dart
index 0a675667..05c0ec93 100644
--- a/test/implicit_dependency_test.dart
+++ b/test/implicit_dependency_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/barback.dart' as barback;
 import 'package:pub_semver/pub_semver.dart';
 
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
-import '../lib/src/barback.dart' as barback;
 
 main() {
   initConfig();
diff --git a/test/io_test.dart b/test/io_test.dart
index cc5d2c4d..87484937 100644
--- a/test/io_test.dart
+++ b/test/io_test.dart
@@ -8,9 +8,9 @@ import 'dart:async';
 import 'dart:io';
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:unittest/unittest.dart';
 
-import '../lib/src/io.dart';
 import 'test_pub.dart';
 
 main() {
diff --git a/test/lish/archives_and_uploads_a_package_test.dart b/test/lish/archives_and_uploads_a_package_test.dart
index 114159fe..b4ff9dec 100644
--- a/test/lish/archives_and_uploads_a_package_test.dart
+++ b/test/lish/archives_and_uploads_a_package_test.dart
@@ -4,11 +4,11 @@
 
 import 'dart:convert';
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/cloud_storage_upload_doesnt_redirect_test.dart b/test/lish/cloud_storage_upload_doesnt_redirect_test.dart
index faef7ca2..904af942 100644
--- a/test/lish/cloud_storage_upload_doesnt_redirect_test.dart
+++ b/test/lish/cloud_storage_upload_doesnt_redirect_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/cloud_storage_upload_provides_an_error_test.dart b/test/lish/cloud_storage_upload_provides_an_error_test.dart
index fd0dda8d..4857b453 100644
--- a/test/lish/cloud_storage_upload_provides_an_error_test.dart
+++ b/test/lish/cloud_storage_upload_provides_an_error_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/does_not_publish_if_private_test.dart b/test/lish/does_not_publish_if_private_test.dart
index a732d203..96364e09 100644
--- a/test/lish/does_not_publish_if_private_test.dart
+++ b/test/lish/does_not_publish_if_private_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/does_not_publish_if_private_with_server_arg_test.dart b/test/lish/does_not_publish_if_private_with_server_arg_test.dart
index 989d5064..12dbe682 100644
--- a/test/lish/does_not_publish_if_private_with_server_arg_test.dart
+++ b/test/lish/does_not_publish_if_private_with_server_arg_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/force_cannot_be_combined_with_dry_run_test.dart b/test/lish/force_cannot_be_combined_with_dry_run_test.dart
index 331d7996..58199191 100644
--- a/test/lish/force_cannot_be_combined_with_dry_run_test.dart
+++ b/test/lish/force_cannot_be_combined_with_dry_run_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/force_does_not_publish_if_private_test.dart b/test/lish/force_does_not_publish_if_private_test.dart
index 53824f0d..b696a9f8 100644
--- a/test/lish/force_does_not_publish_if_private_test.dart
+++ b/test/lish/force_does_not_publish_if_private_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/force_does_not_publish_if_there_are_errors_test.dart b/test/lish/force_does_not_publish_if_there_are_errors_test.dart
index 4805cd5b..4d408ea8 100644
--- a/test/lish/force_does_not_publish_if_there_are_errors_test.dart
+++ b/test/lish/force_does_not_publish_if_there_are_errors_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart b/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
index c0a1575d..91efa6fb 100644
--- a/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
+++ b/test/lish/force_publishes_if_tests_are_no_warnings_or_errors_test.dart
@@ -4,12 +4,12 @@
 
 import 'dart:convert';
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/force_publishes_if_there_are_warnings_test.dart b/test/lish/force_publishes_if_there_are_warnings_test.dart
index 092855d0..ff46df51 100644
--- a/test/lish/force_publishes_if_there_are_warnings_test.dart
+++ b/test/lish/force_publishes_if_there_are_warnings_test.dart
@@ -4,12 +4,12 @@
 
 import 'dart:convert';
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/many_files_test.dart b/test/lish/many_files_test.dart
index 776779ae..9c64b784 100644
--- a/test/lish/many_files_test.dart
+++ b/test/lish/many_files_test.dart
@@ -7,11 +7,11 @@ import 'dart:io';
 import 'dart:math' as math;
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/package_validation_has_a_warning_and_continues_test.dart b/test/lish/package_validation_has_a_warning_and_continues_test.dart
index 89d84e7f..62fbc5a1 100644
--- a/test/lish/package_validation_has_a_warning_and_continues_test.dart
+++ b/test/lish/package_validation_has_a_warning_and_continues_test.dart
@@ -4,12 +4,12 @@
 
 import 'dart:convert';
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart b/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart
index 314c528e..b0454e19 100644
--- a/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart
+++ b/test/lish/package_validation_has_a_warning_and_is_canceled_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/package_validation_has_an_error_test.dart b/test/lish/package_validation_has_an_error_test.dart
index 9eeae1a2..762696d9 100644
--- a/test/lish/package_validation_has_an_error_test.dart
+++ b/test/lish/package_validation_has_an_error_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/preview_errors_if_private_test.dart b/test/lish/preview_errors_if_private_test.dart
index 5884c1e5..20296c8b 100644
--- a/test/lish/preview_errors_if_private_test.dart
+++ b/test/lish/preview_errors_if_private_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/preview_package_validation_has_a_warning_test.dart b/test/lish/preview_package_validation_has_a_warning_test.dart
index cbc94fb3..5f80d9d9 100644
--- a/test/lish/preview_package_validation_has_a_warning_test.dart
+++ b/test/lish/preview_package_validation_has_a_warning_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/preview_package_validation_has_no_warnings_test.dart b/test/lish/preview_package_validation_has_no_warnings_test.dart
index 66f092eb..4da152a0 100644
--- a/test/lish/preview_package_validation_has_no_warnings_test.dart
+++ b/test/lish/preview_package_validation_has_no_warnings_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/server_arg_does_not_override_private_test.dart b/test/lish/server_arg_does_not_override_private_test.dart
index 5be6bfc8..8d33c823 100644
--- a/test/lish/server_arg_does_not_override_private_test.dart
+++ b/test/lish/server_arg_does_not_override_private_test.dart
@@ -2,9 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lish/utils.dart b/test/lish/utils.dart
index 00127c1e..de9dde37 100644
--- a/test/lish/utils.dart
+++ b/test/lish/utils.dart
@@ -6,11 +6,11 @@ library lish.utils;
 
 import 'dart:convert';
 
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/io.dart';
 
 void handleUploadForm(ScheduledServer server, [Map body]) {
   server.handle('GET', '/api/packages/versions/new', (request) {
diff --git a/test/list_package_dirs/ignores_updated_pubspec_test.dart b/test/list_package_dirs/ignores_updated_pubspec_test.dart
index 33d5065c..12498be7 100644
--- a/test/list_package_dirs/ignores_updated_pubspec_test.dart
+++ b/test/list_package_dirs/ignores_updated_pubspec_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/list_package_dirs/includes_dev_dependencies_test.dart b/test/list_package_dirs/includes_dev_dependencies_test.dart
index 69bbe454..18c33544 100644
--- a/test/list_package_dirs/includes_dev_dependencies_test.dart
+++ b/test/list_package_dirs/includes_dev_dependencies_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/list_package_dirs/lists_dependency_directories_test.dart b/test/list_package_dirs/lists_dependency_directories_test.dart
index fe29d819..6d16e39a 100644
--- a/test/list_package_dirs/lists_dependency_directories_test.dart
+++ b/test/list_package_dirs/lists_dependency_directories_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/list_package_dirs/lockfile_error_test.dart b/test/list_package_dirs/lockfile_error_test.dart
index 893e2067..5cd4fa9e 100644
--- a/test/list_package_dirs/lockfile_error_test.dart
+++ b/test/list_package_dirs/lockfile_error_test.dart
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/list_package_dirs/missing_pubspec_test.dart b/test/list_package_dirs/missing_pubspec_test.dart
index ea32e58a..3cb9ecf5 100644
--- a/test/list_package_dirs/missing_pubspec_test.dart
+++ b/test/list_package_dirs/missing_pubspec_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/list_package_dirs/no_lockfile_test.dart b/test/list_package_dirs/no_lockfile_test.dart
index 397e4a2b..1b3b55de 100644
--- a/test/list_package_dirs/no_lockfile_test.dart
+++ b/test/list_package_dirs/no_lockfile_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE d.file.
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/list_package_dirs/pubspec_error_test.dart b/test/list_package_dirs/pubspec_error_test.dart
index 6e4a4ee4..b8855da4 100644
--- a/test/list_package_dirs/pubspec_error_test.dart
+++ b/test/list_package_dirs/pubspec_error_test.dart
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE d.file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/lock_file_test.dart b/test/lock_file_test.dart
index a2ce2f7a..d1b68de3 100644
--- a/test/lock_file_test.dart
+++ b/test/lock_file_test.dart
@@ -6,15 +6,15 @@ library lock_file_test;
 
 import 'dart:async';
 
+import 'package:pub/src/lock_file.dart';
+import 'package:pub/src/package.dart';
+import 'package:pub/src/pubspec.dart';
+import 'package:pub/src/source.dart';
+import 'package:pub/src/source_registry.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:unittest/unittest.dart';
 import 'package:yaml/yaml.dart';
 
-import '../lib/src/lock_file.dart';
-import '../lib/src/package.dart';
-import '../lib/src/pubspec.dart';
-import '../lib/src/source.dart';
-import '../lib/src/source_registry.dart';
 import 'test_pub.dart';
 
 class MockSource extends Source {
diff --git a/test/oauth2/utils.dart b/test/oauth2/utils.dart
index d69941b3..da7b83cf 100644
--- a/test/oauth2/utils.dart
+++ b/test/oauth2/utils.dart
@@ -7,12 +7,12 @@ library oauth2.utils;
 import 'dart:convert';
 
 import 'package:http/http.dart' as http;
+import 'package:pub/src/utils.dart';
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/utils.dart';
 
 void authorizePub(ScheduledProcess pub, ScheduledServer server,
     [String accessToken="access token"]) {
diff --git a/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart b/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart
index 25ca1ca2..7cfebda6 100644
--- a/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart
+++ b/test/oauth2/with_a_server_rejected_refresh_token_authenticates_again_test.dart
@@ -4,11 +4,11 @@
 
 import 'dart:convert';
 
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/package_list_files_test.dart b/test/package_list_files_test.dart
index 079a6b97..f7a0da2c 100644
--- a/test/package_list_files_test.dart
+++ b/test/package_list_files_test.dart
@@ -5,11 +5,11 @@
 library packages_list_files_test;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/io.dart';
+import 'package:pub/src/system_cache.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../lib/src/entrypoint.dart';
-import '../lib/src/io.dart';
-import '../lib/src/system_cache.dart';
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
diff --git a/test/preprocess_test.dart b/test/preprocess_test.dart
index 4f43dd81..ac58c375 100644
--- a/test/preprocess_test.dart
+++ b/test/preprocess_test.dart
@@ -4,10 +4,10 @@
 
 library pub.test.preprocess_test;
 
+import 'package:pub/src/preprocess.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:unittest/unittest.dart';
 
-import '../lib/src/preprocess.dart';
 import 'test_pub.dart';
 
 main() {
diff --git a/test/pub_get_and_upgrade_test.dart b/test/pub_get_and_upgrade_test.dart
index c5d78a35..c810e025 100644
--- a/test/pub_get_and_upgrade_test.dart
+++ b/test/pub_get_and_upgrade_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../lib/src/exit_codes.dart' as exit_codes;
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
diff --git a/test/pub_test.dart b/test/pub_test.dart
index d664fa7f..bfed17cb 100644
--- a/test/pub_test.dart
+++ b/test/pub_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../lib/src/exit_codes.dart' as exit_codes;
 import 'test_pub.dart';
 
 main() {
diff --git a/test/pub_uploader_test.dart b/test/pub_uploader_test.dart
index 89054ebb..73c101f3 100644
--- a/test/pub_uploader_test.dart
+++ b/test/pub_uploader_test.dart
@@ -6,13 +6,13 @@ library pub_uploader_test;
 
 import 'dart:convert';
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/utils.dart';
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_server.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:shelf/shelf.dart' as shelf;
 
-import '../lib/src/exit_codes.dart' as exit_codes;
-import '../lib/src/utils.dart';
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
diff --git a/test/pubspec_test.dart b/test/pubspec_test.dart
index 4fddbd41..93c067da 100644
--- a/test/pubspec_test.dart
+++ b/test/pubspec_test.dart
@@ -6,14 +6,14 @@ library pubspec_test;
 
 import 'dart:async';
 
+import 'package:pub/src/package.dart';
+import 'package:pub/src/pubspec.dart';
+import 'package:pub/src/source.dart';
+import 'package:pub/src/source/path.dart';
+import 'package:pub/src/source_registry.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:unittest/unittest.dart';
 
-import '../lib/src/package.dart';
-import '../lib/src/pubspec.dart';
-import '../lib/src/source.dart';
-import '../lib/src/source/path.dart';
-import '../lib/src/source_registry.dart';
 import 'test_pub.dart';
 
 class MockSource extends Source {
diff --git a/test/real_version_test.dart b/test/real_version_test.dart
index 97138087..a42fcf89 100644
--- a/test/real_version_test.dart
+++ b/test/real_version_test.dart
@@ -7,11 +7,11 @@ library pub_tests;
 import 'dart:io';
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/sdk.dart' as sdk;
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../lib/src/exit_codes.dart' as exit_codes;
-import '../lib/src/sdk.dart' as sdk;
 import 'test_pub.dart';
 
 main() {
diff --git a/test/run/errors_if_no_executable_is_given_test.dart b/test/run/errors_if_no_executable_is_given_test.dart
index 388d4979..5951bf06 100644
--- a/test/run/errors_if_no_executable_is_given_test.dart
+++ b/test/run/errors_if_no_executable_is_given_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/run/errors_if_only_transitive_dependency_test.dart b/test/run/errors_if_only_transitive_dependency_test.dart
index c644b531..7c8f0489 100644
--- a/test/run/errors_if_only_transitive_dependency_test.dart
+++ b/test/run/errors_if_only_transitive_dependency_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/run/errors_if_path_in_dependency_test.dart b/test/run/errors_if_path_in_dependency_test.dart
index 3874f350..2c6736c4 100644
--- a/test/run/errors_if_path_in_dependency_test.dart
+++ b/test/run/errors_if_path_in_dependency_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/run/nonexistent_dependency_test.dart b/test/run/nonexistent_dependency_test.dart
index 4ecb666f..cad71741 100644
--- a/test/run/nonexistent_dependency_test.dart
+++ b/test/run/nonexistent_dependency_test.dart
@@ -2,7 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/run/nonexistent_script_in_dependency_test.dart b/test/run/nonexistent_script_in_dependency_test.dart
index 88fdfc06..1249cafc 100644
--- a/test/run/nonexistent_script_in_dependency_test.dart
+++ b/test/run/nonexistent_script_in_dependency_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/run/nonexistent_script_test.dart b/test/run/nonexistent_script_test.dart
index 7704fdf6..2f70bf39 100644
--- a/test/run/nonexistent_script_test.dart
+++ b/test/run/nonexistent_script_test.dart
@@ -3,8 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/serve/gets_first_if_dependency_is_not_installed_test.dart b/test/serve/gets_first_if_dependency_is_not_installed_test.dart
index d76d8367..2cef829d 100644
--- a/test/serve/gets_first_if_dependency_is_not_installed_test.dart
+++ b/test/serve/gets_first_if_dependency_is_not_installed_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/serve/gets_first_if_transitive_dependency_is_not_installed_test.dart b/test/serve/gets_first_if_transitive_dependency_is_not_installed_test.dart
index 3d367450..60f3e261 100644
--- a/test/serve/gets_first_if_transitive_dependency_is_not_installed_test.dart
+++ b/test/serve/gets_first_if_transitive_dependency_is_not_installed_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/serve/missing_file_test.dart b/test/serve/missing_file_test.dart
index be567431..5c41aa98 100644
--- a/test/serve/missing_file_test.dart
+++ b/test/serve/missing_file_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/serve/native_watch_removed_file_test.dart b/test/serve/native_watch_removed_file_test.dart
index 271842ef..2b278720 100644
--- a/test/serve/native_watch_removed_file_test.dart
+++ b/test/serve/native_watch_removed_file_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/serve/utils.dart b/test/serve/utils.dart
index be87afc4..c153f23d 100644
--- a/test/serve/utils.dart
+++ b/test/serve/utils.dart
@@ -9,12 +9,12 @@ import 'dart:convert';
 import 'dart:io';
 
 import 'package:http/http.dart' as http;
+import 'package:pub/src/utils.dart';
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:stack_trace/stack_trace.dart';
 
-import '../../lib/src/utils.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/serve/watch_removed_file_test.dart b/test/serve/watch_removed_file_test.dart
index 55ff576d..81aac105 100644
--- a/test/serve/watch_removed_file_test.dart
+++ b/test/serve/watch_removed_file_test.dart
@@ -5,9 +5,9 @@
 library pub_tests;
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/serve/web_socket/path_to_urls_test.dart b/test/serve/web_socket/path_to_urls_test.dart
index 5db405c3..cb288ebd 100644
--- a/test/serve/web_socket/path_to_urls_test.dart
+++ b/test/serve/web_socket/path_to_urls_test.dart
@@ -5,8 +5,8 @@
 library pub_tests;
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
 
-import '../../../lib/src/io.dart';
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 import '../utils.dart';
diff --git a/test/serve_packages.dart b/test/serve_packages.dart
index 35c970f7..3a949f68 100644
--- a/test/serve_packages.dart
+++ b/test/serve_packages.dart
@@ -8,12 +8,12 @@ import 'dart:async';
 import 'dart:convert';
 
 import 'package:path/path.dart' as p;
+import 'package:pub/src/io.dart';
+import 'package:pub/src/utils.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:yaml/yaml.dart';
 
-import '../lib/src/io.dart';
-import '../lib/src/utils.dart';
 import 'descriptor.dart' as d;
 import 'test_pub.dart';
 
diff --git a/test/test_pub.dart b/test/test_pub.dart
index ac620d5c..f7b041d5 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -17,6 +17,25 @@ import 'dart:math';
 import 'package:crypto/crypto.dart';
 import 'package:http/testing.dart';
 import 'package:path/path.dart' as p;
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/exit_codes.dart' as exit_codes;
+// TODO(rnystrom): Using "gitlib" as the prefix here is ugly, but "git" collides
+// with the git descriptor method. Maybe we should try to clean up the top level
+// scope a bit?
+import 'package:pub/src/git.dart' as gitlib;
+import 'package:pub/src/http.dart';
+import 'package:pub/src/io.dart';
+import 'package:pub/src/lock_file.dart';
+import 'package:pub/src/log.dart' as log;
+import 'package:pub/src/package.dart';
+import 'package:pub/src/pubspec.dart';
+import 'package:pub/src/sdk.dart' as sdk;
+import 'package:pub/src/source/hosted.dart';
+import 'package:pub/src/source/path.dart';
+import 'package:pub/src/source_registry.dart';
+import 'package:pub/src/system_cache.dart';
+import 'package:pub/src/utils.dart';
+import 'package:pub/src/validator.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:scheduled_test/scheduled_process.dart';
 import 'package:scheduled_test/scheduled_server.dart';
@@ -27,25 +46,6 @@ import 'package:shelf/shelf_io.dart' as shelf_io;
 import 'package:unittest/compact_vm_config.dart';
 import 'package:yaml/yaml.dart';
 
-import '../lib/src/entrypoint.dart';
-import '../lib/src/exit_codes.dart' as exit_codes;
-// TODO(rnystrom): Using "gitlib" as the prefix here is ugly, but "git" collides
-// with the git descriptor method. Maybe we should try to clean up the top level
-// scope a bit?
-import '../lib/src/git.dart' as gitlib;
-import '../lib/src/http.dart';
-import '../lib/src/io.dart';
-import '../lib/src/lock_file.dart';
-import '../lib/src/log.dart' as log;
-import '../lib/src/package.dart';
-import '../lib/src/pubspec.dart';
-import '../lib/src/sdk.dart' as sdk;
-import '../lib/src/source/hosted.dart';
-import '../lib/src/source/path.dart';
-import '../lib/src/source_registry.dart';
-import '../lib/src/system_cache.dart';
-import '../lib/src/utils.dart';
-import '../lib/src/validator.dart';
 import 'descriptor.dart' as d;
 import 'serve_packages.dart';
 
diff --git a/test/transcript_test.dart b/test/transcript_test.dart
index 34ea1303..6a81d561 100644
--- a/test/transcript_test.dart
+++ b/test/transcript_test.dart
@@ -4,9 +4,10 @@
 
 library version_test;
 
+import 'package:pub/src/transcript.dart';
 import 'package:unittest/unittest.dart';
+
 import 'test_pub.dart';
-import '../lib/src/transcript.dart';
 
 main() {
   initConfig();
diff --git a/test/transformer/can_log_messages_test.dart b/test/transformer/can_log_messages_test.dart
index da82d5dd..3240d628 100644
--- a/test/transformer/can_log_messages_test.dart
+++ b/test/transformer/can_log_messages_test.dart
@@ -4,10 +4,10 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 import 'package:scheduled_test/scheduled_stream.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart b/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart
index 79f0fcbe..47e99e35 100644
--- a/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart
+++ b/test/transformer/fails_to_load_a_pubspec_with_reserved_transformer_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import '../serve/utils.dart';
diff --git a/test/transformer/fails_to_load_a_transform_from_a_deps_dev_dependency_test.dart b/test/transformer/fails_to_load_a_transform_from_a_deps_dev_dependency_test.dart
index 30088354..f8cee7e5 100644
--- a/test/transformer/fails_to_load_a_transform_from_a_deps_dev_dependency_test.dart
+++ b/test/transformer/fails_to_load_a_transform_from_a_deps_dev_dependency_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import '../serve/utils.dart';
diff --git a/test/transformer/fails_to_load_a_transform_from_a_non_dependency_test.dart b/test/transformer/fails_to_load_a_transform_from_a_non_dependency_test.dart
index 1e649c15..d35c68d4 100644
--- a/test/transformer/fails_to_load_a_transform_from_a_non_dependency_test.dart
+++ b/test/transformer/fails_to_load_a_transform_from_a_non_dependency_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/exit_codes.dart' as exit_codes;
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import '../serve/utils.dart';
diff --git a/test/upgrade/dry_run_does_not_apply_changes_test.dart b/test/upgrade/dry_run_does_not_apply_changes_test.dart
index 6747a447..a9f223e1 100644
--- a/test/upgrade/dry_run_does_not_apply_changes_test.dart
+++ b/test/upgrade/dry_run_does_not_apply_changes_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/io.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/io.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 
diff --git a/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart b/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
index 90995ea3..8952e3b7 100644
--- a/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
+++ b/test/upgrade/git/upgrade_to_incompatible_pubspec_test.dart
@@ -4,9 +4,9 @@
 
 library pub_tests;
 
+import 'package:pub/src/exit_codes.dart' as exit_codes;
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../../lib/src/exit_codes.dart' as exit_codes;
 import '../../descriptor.dart' as d;
 import '../../test_pub.dart';
 
diff --git a/test/utils_test.dart b/test/utils_test.dart
index a137d2d0..423083d6 100644
--- a/test/utils_test.dart
+++ b/test/utils_test.dart
@@ -4,9 +4,10 @@
 
 library utils_test;
 
+import 'package:pub/src/utils.dart';
 import 'package:unittest/unittest.dart';
+
 import 'test_pub.dart';
-import '../lib/src/utils.dart';
 
 main() {
   initConfig();
diff --git a/test/validator/compiled_dartdoc_test.dart b/test/validator/compiled_dartdoc_test.dart
index d269b061..e83991fd 100644
--- a/test/validator/compiled_dartdoc_test.dart
+++ b/test/validator/compiled_dartdoc_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/compiled_dartdoc.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/compiled_dartdoc.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/dependency_override_test.dart b/test/validator/dependency_override_test.dart
index 6f336a27..ae3e71ce 100644
--- a/test/validator/dependency_override_test.dart
+++ b/test/validator/dependency_override_test.dart
@@ -2,9 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/dependency_override.dart';
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/dependency_override.dart';
+
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/dependency_test.dart b/test/validator/dependency_test.dart
index dd301294..9a8d0154 100644
--- a/test/validator/dependency_test.dart
+++ b/test/validator/dependency_test.dart
@@ -8,11 +8,11 @@ import 'dart:convert';
 import 'package:http/http.dart' as http;
 import 'package:http/testing.dart';
 import 'package:path/path.dart' as path;
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/dependency.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/dependency.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/directory_test.dart b/test/validator/directory_test.dart
index 02571acd..46dbf843 100644
--- a/test/validator/directory_test.dart
+++ b/test/validator/directory_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/directory.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/directory.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/executable_test.dart b/test/validator/executable_test.dart
index 6d1fb816..437811e7 100644
--- a/test/validator/executable_test.dart
+++ b/test/validator/executable_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/executable.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/executable.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/license_test.dart b/test/validator/license_test.dart
index 5c3a06ba..76f3a4da 100644
--- a/test/validator/license_test.dart
+++ b/test/validator/license_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/io.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/license.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/io.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/license.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/name_test.dart b/test/validator/name_test.dart
index 17a460fe..f40b1bf6 100644
--- a/test/validator/name_test.dart
+++ b/test/validator/name_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:path/path.dart' as path;
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/io.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/name.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/io.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/name.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/pubspec_field_test.dart b/test/validator/pubspec_field_test.dart
index 4f0f33ec..3af75efc 100644
--- a/test/validator/pubspec_field_test.dart
+++ b/test/validator/pubspec_field_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/pubspec_field.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/pubspec_field.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/sdk_constraint_test.dart b/test/validator/sdk_constraint_test.dart
index 4efb8220..c1f1542f 100644
--- a/test/validator/sdk_constraint_test.dart
+++ b/test/validator/sdk_constraint_test.dart
@@ -8,11 +8,11 @@ import 'dart:convert';
 import 'package:http/http.dart' as http;
 import 'package:http/testing.dart';
 import 'package:path/path.dart' as path;
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/sdk_constraint.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/sdk_constraint.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/size_test.dart b/test/validator/size_test.dart
index 37b9eab1..548fae36 100644
--- a/test/validator/size_test.dart
+++ b/test/validator/size_test.dart
@@ -5,9 +5,9 @@
 import 'dart:async';
 import 'dart:math' as math;
 
+import 'package:pub/src/validator/size.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/validator/size.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/validator/utf8_readme_test.dart b/test/validator/utf8_readme_test.dart
index 60e65fdb..bf0273f6 100644
--- a/test/validator/utf8_readme_test.dart
+++ b/test/validator/utf8_readme_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:pub/src/entrypoint.dart';
+import 'package:pub/src/validator.dart';
+import 'package:pub/src/validator/utf8_readme.dart';
 import 'package:scheduled_test/scheduled_test.dart';
 
-import '../../lib/src/entrypoint.dart';
-import '../../lib/src/validator.dart';
-import '../../lib/src/validator/utf8_readme.dart';
 import '../descriptor.dart' as d;
 import '../test_pub.dart';
 import 'utils.dart';
diff --git a/test/version_solver_test.dart b/test/version_solver_test.dart
index d025ed7f..ee3176e3 100644
--- a/test/version_solver_test.dart
+++ b/test/version_solver_test.dart
@@ -6,18 +6,18 @@ library pub_upgrade_test;
 
 import 'dart:async';
 
+import 'package:pub/src/lock_file.dart';
+import 'package:pub/src/log.dart' as log;
+import 'package:pub/src/package.dart';
+import 'package:pub/src/pubspec.dart';
+import 'package:pub/src/sdk.dart' as sdk;
+import 'package:pub/src/solver/version_solver.dart';
+import 'package:pub/src/source/cached.dart';
+import 'package:pub/src/system_cache.dart';
+import 'package:pub/src/utils.dart';
 import 'package:pub_semver/pub_semver.dart';
 import 'package:unittest/unittest.dart';
 
-import '../lib/src/lock_file.dart';
-import '../lib/src/log.dart' as log;
-import '../lib/src/package.dart';
-import '../lib/src/pubspec.dart';
-import '../lib/src/sdk.dart' as sdk;
-import '../lib/src/source/cached.dart';
-import '../lib/src/system_cache.dart';
-import '../lib/src/utils.dart';
-import '../lib/src/solver/version_solver.dart';
 import 'test_pub.dart';
 
 MockSource source1;
-- 
GitLab