test: remove use of require('test.helpers')

The test.functional.helpers and test.unit.helpers modules now include
all of the public functions from test.helpers, so there is no need to
separately require('test.helpers').
This commit is contained in:
Justin M. Keyes
2019-05-18 14:09:43 +02:00
parent 7669fc1e9b
commit fd04877eb0
14 changed files with 27 additions and 45 deletions

View File

@@ -1,5 +1,4 @@
local helpers = require('test.functional.helpers')(after_each)
local global_helpers = require('test.helpers')
local bufmeths = helpers.bufmeths
local clear = helpers.clear
@@ -12,8 +11,8 @@ local funcs = helpers.funcs
local meths = helpers.meths
local source = helpers.source
local shallowcopy = global_helpers.shallowcopy
local sleep = global_helpers.sleep
local shallowcopy = helpers.shallowcopy
local sleep = helpers.sleep
describe('nvim_get_keymap', function()
before_each(clear)

View File

@@ -1,6 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local global_helpers = require('test.helpers')
local NIL = helpers.NIL
local clear, nvim, eq, neq = helpers.clear, helpers.nvim, helpers.eq, helpers.neq
@@ -16,10 +15,10 @@ local request = helpers.request
local source = helpers.source
local next_msg = helpers.next_msg
local expect_err = global_helpers.expect_err
local format_string = global_helpers.format_string
local intchar2lua = global_helpers.intchar2lua
local mergedicts_copy = global_helpers.mergedicts_copy
local expect_err = helpers.expect_err
local format_string = helpers.format_string
local intchar2lua = helpers.intchar2lua
local mergedicts_copy = helpers.mergedicts_copy
describe('API', function()
before_each(clear)

View File

@@ -1,7 +1,5 @@
local global_helpers = require('test.helpers')
local uname = global_helpers.uname
local helpers = require('test.functional.helpers')(after_each)
local uname = helpers.uname
local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq,
helpers.eval, helpers.next_msg, helpers.ok, helpers.source
local command, funcs, meths = helpers.command, helpers.funcs, helpers.meths

View File

@@ -59,7 +59,7 @@ describe(':let', function()
end)
it("multibyte env var to child process #8398 #9267", function()
if (not helpers.iswin()) and require('test.helpers').isCI() then
if (not helpers.iswin()) and helpers.isCI() then
-- Fails on non-Windows CI. Buffering/timing issue?
pending('fails on unix CI', function() end)
end

View File

@@ -16,7 +16,6 @@ local eq = global_helpers.eq
local ok = global_helpers.ok
local sleep = global_helpers.sleep
local table_contains = global_helpers.table_contains
local table_flatten = global_helpers.table_flatten
local write_file = global_helpers.write_file
local start_dir = lfs.currentdir()

View File

@@ -1,5 +1,4 @@
local helpers = require('test.functional.helpers')(after_each)
local global_helpers = require('test.helpers')
local Screen = require('test.functional.ui.screen')
@@ -16,7 +15,7 @@ local neq = helpers.neq
local mkdir = helpers.mkdir
local rmdir = helpers.rmdir
local alter_slashes = helpers.alter_slashes
local table_contains = global_helpers.table_contains
local table_contains = helpers.table_contains
describe('startup defaults', function()
describe(':filetype', function()

View File

@@ -1,8 +1,7 @@
-- TUI acceptance tests.
-- Uses :terminal as a way to send keys and assert screen state.
local global_helpers = require('test.helpers')
local uname = global_helpers.uname
local helpers = require('test.functional.helpers')(after_each)
local uname = helpers.uname
local thelpers = require('test.functional.terminal.helpers')
local Screen = require('test.functional.ui.screen')
local eq = helpers.eq

View File

@@ -1,10 +1,9 @@
local global_helpers = require('test.helpers')
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local command = helpers.command
local eq = helpers.eq
local shallowcopy = global_helpers.shallowcopy
local shallowcopy = helpers.shallowcopy
describe('ui receives option updates', function()
local screen

View File

@@ -71,11 +71,10 @@
-- To help write screen tests, see Screen:snapshot_util().
-- To debug screen tests, see Screen:redraw_debug().
local global_helpers = require('test.helpers')
local deepcopy = global_helpers.deepcopy
local shallowcopy = global_helpers.shallowcopy
local concat_tables = global_helpers.concat_tables
local helpers = require('test.functional.helpers')(nil)
local deepcopy = helpers.deepcopy
local shallowcopy = helpers.shallowcopy
local concat_tables = helpers.concat_tables
local request, run_session = helpers.request, helpers.run_session
local eq = helpers.eq
local dedent = helpers.dedent

View File

@@ -1,7 +1,6 @@
local global_helpers = require('test.helpers')
local shallowcopy = global_helpers.shallowcopy
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local shallowcopy = helpers.shallowcopy
local clear, feed, command = helpers.clear, helpers.feed, helpers.command
local iswin = helpers.iswin
local funcs = helpers.funcs